I have been talking with DaBOSS54320 about this and there is NO way to just prevent the trouble meter from reaching red and keep it at yellow. You can only enable or disable punishments and thats as far as it goes.
You can potentially use a mem hacking tool to freeze the trouble meter at yellow but thats about all you really can do since the trouble meter is controlled inside bully.exe and is not fully controlled via lua from what I can see so far.
There still may be a possible way thru lua to do this but it will take some serious poking around to even get a base idea exactly how the trouble meter even works.