What about a script that disables all ports that are not infrastructure? For the routing I am not aware of a ways to just disable it, but removing and adding back the SVIs could also be automated with a script. Just make sure you don't remove config that is needed for the infrastructure itself.
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.