Have you tried Santa?I have the same issue/request.
Santa can block Terminal.
View attachment 2006577
As Santa is managed through Terminal with santactl, the only way to reenable Terminal is to delete Santa (requires admin password) and reboot.
https://github.com/google/santa
https://santa.dev/details/rules.html