They could simply offer a “move to trash” approach to get around any legal restrictions of the kind you are imagining.
This would also be much nicer UX. Just click a button to delete something, and it says something like “This has has been moved to Trash, and will be permanently deleted in 30 days”. No big scary warnings needed. And you can still delete it immediately if you want (by emptying your trash afterwards) so it’s not in breach of any laws.
If you feel something needs get giant flashing warning messages perhaps make it reversible for a week.