NOSTR kind 5 (NIP-09 Event Deletion) exists and has already been implemented and observed in some fashion by some nostr clients and relays.
Note: NOSTR kind 5 is a best effort approach and relies on both the client and the relay on observing the protocol rules. It is by no means perfect. Nothing is.
It will not save you in court.
It is no different from X deciding to backup your "deleted" tweets and sharing DB with third party.