

I don’t think you can since it’s an encrypted file system, deletions are more permanent.
As others have said, always duplicate data elsewhere.
My phone continuously syncs important data to my computer at home using Syncthing-Fork (on Android), SyncTrayzor (Windows) and Syncthing (Linux).
My photos show up at home in seconds, regardless of where I am, so long as I have a connection.
My data at home has it’s own backup process, so my phone data is included in that.










I doubt SD Maid did this automatically. I’ve used it for 10+ years, it’s smarter than that.
But you could manually do it with SD Maid.