You would have to handle inheritance by on_death event to disallow inheritance by trait, as you can't mod the mechanics of the vanilla inheritance laws.
The disallowing internal wars by trait can be handled by modding the CBs.
The disallowing internal wars by trait can be handled by modding the CBs.