The general rule for RI relationships is to treat them like trees and then be an arborist.
You plant trees at the roots. You trim trees at the branches. Therefore, draw out the structures of the tables showing all relationships having RI. Then find the ones that have no dependent tables. These are the most distance branches. I.e. identify the tables that are farthest from the root. You can do the DELETE * from TABLE on the farthest tables first.
Once the farthest tables have been emptied, you can identify the next layer that is now exposed because of the prior "trimming" operation. They MIGHT have previously had dependents but you trimmed them all. So now it is THESE tables that are your branch tables. Trim them.
Work your way towards the root. Eventually, you will be able to delete the root (or roots) when all branches have been trimmed. I am pretty sure this works because Access won't let you build a circular dependency. That would be the only condition that would prevent you from doing what you want programmatically.
Sounds like a lot of work but you can create your 30 Erase queries and figure out their correct order. Then put them in a macro in that order. Run the macro when you are about to repopulate.