There is no undo to solve this problem, no periodic backups in the background to solve this problem, and no SQLite function to solve this problem. You will need to restore from the most recent backup that you yourself took. You could have taken a backup via File>Backup or you could have taken a backup via an automatic backup you took when exiting RM if you have that option enabled. An automatic backup during exit (which does exist if you turn it on) is not the same thing as a periodic backup in the background while you are working (which does not exist).
I'm guessing here, but I suspect you have been bitten by a poor design in the user interface for Place and Place Details. Namely, when you are in the Place screen and highlight a Place, you see all the Place Details associated with that Place. You can then highlight a Place Detail. But if you do so and immediately click on Delete or Merge, you are really deleting or merging the Place you are on, not the Place Detail you clicked. If you want to Delete or Merge a Place Detail, you have to click the Place Detail button in addition to highlighting a Place Detail. Simply highlighting the Place Detail is not enough. The software is working as designed in this screen, but it's really broken as designed because the design is broken. It will be interesting to see if the handling of Place and Place Details in this regard is improved in RM8.
In your particular case, you almost certainly highlighted the Place Detail of "n/a", didn't click the Place Details Button, and did click the Delete button. Without realizing it, you were still on the Place and not on the Place Details so you deleted the whole Place. If you don't have any backups, you will have to find all the events in your database that were using the Place you deleted and type it back in. This could be a significant challenge.
Back to your original comments. It actually is within RM's ability to merge two identical cemeteries without merging the whole place or to delete a single cemetery or other Place Detail without deleting the whole Place. The key is remembering to click the Place Details button, and you have no incentive to do so since it feels like you have already selected Place Details to delete or merge.