Sounds like this might help: https://www.gnu.org/software/bash/manual/html_node/The-Restr...
I'm not familiar with rbash, but it seems like it can do (at least some of) what you want.