I don't know.
However, I believe a lot of people fear mandating nobles more than they should. I would never quit over extra nobles. Bring on those mandates.
I just ignore most mandates. Dwarves don't die from some prison time. In fact, those dwarves that get to bring them food and water will actually be able to fulfill those hard to get needs of 'being able to help someone', plus the imprisoned dwarf gets a happy thought when released (some even get positive thoughts for being in prison; 'Urist felt repentant while being in prison').
If you have a hammerer appointed, justice can be deadly. Fix that by either prepping a dwarf that likes hammers for an aluminum artefact warhammer mood, or if you have candy, make a candy warhammer. Do make sure that at no point you have any other warhammer just laying around in your fort, because your hammerer will just grab the nearest available hammer to deliver hammerstrikes. Warhammers assigned to, and worn by military dwarves are safe, a hammerer won't touch those.
Ofcourse this whole alinea can be skipped if you never assign a hammerer in the first place.
If you have too little jail cells, and perhaps as standard too once you get a king, dwarves can also be sentenced to 'beating'. Prevent danger by having enough jail cells, by making sure every dwarf is wearing full armor, and by making sure that your sherrif and later, captain of the guard squad, are not too strong. Not sure if beatings use assigned weapons, to be safe make sure they don't have weapons either. Or give them candy warhammers.