This is more of a suggestion than anything, but, for the protocol, I think the justice system is ought to give at least some benefit to the player - something as small as a positive thought to all law-abiding dwarves in the fort whenever a just punishment is carried out. The game already gives all dwarves a negative thought if the player convicts an animal/corpse/victim, after all, so the framework is there.
It actually used to pre-stress. Back when we had happiness, a dwarf who survived their prison sentence would get a +1000 happiness bonus which was the same as making an artifact and would make sure that they wouldn't spiral. The problem is that feeding was very buggy *at best*, and beatings/hammerer would pretty much destroy any attempts at making justice not be Dwarf Murder 3000.
The "Is happy to be free" thought is still in the game, but it doesn't provide the same bonus to end spirals like it used to. It also used to be that you needed both Fortress Guards and Royal Guards in 23a/40d or there would be fortress wide negative thoughts. Basically, it's more that Dwarven Justice hasn't changed since the 2D versions but the rest of the game did.
The largest problem with happiness is that the game could lead to a tantrum spiral *very* easily and it didn't take much to send a fortress over the edge. If/when justice worked, that would usually stop things from going worse, but it was very easy to spiral out of control. Stress on the other hand generally prevented the "wafer thin mint" problem, and a single bad day (usually) won't break a dwarf in and of itself. The way the needs/personality changes system works however means that negative stress compounds much worse.
It also didn't help that a lot of these problems started when stress was introduced (late 2014), and we didn't get the exile button until 2018. I'm keeping an eye on this thread after watching Kruggsmash's recent stress test fort. Stress/needs was ultimately the final straw that just made DF unappealing to play and withdraw from the community. If its no longer a micromanagement nightmare, I might try starting/joining a succession fort or two.