a solution for this would be to create a new dummy object(contact, deals or company) and update the timeline event(which needs to be deleted) with this dummy objectId and then delete that dummy object.
Note: there might be some workflow triggers or event subscription for integration apps which might trigger for this new object so be mindfull of that
It’s not currently possible to delete timeline events. In general, testing the Timeline Events API should be done in a test portal to avoid creating test/junk events. That said, I can totally understand the use case for being able to delete events. If you have the inclination, I would encourage you to check out the Ideas Forum on the HubSpot Community. There, you can post/vote on ideas for the product so your use case can be seen by HubSpotters, partners, and other customers alike.