score:3
Yes, and it's good to compare it to that quoted story, as many think that for a "higher, nobler" aim, doing wrong is ok. Or out of duties, like moderators and "responsible" often think.
Not only doing by oneself, but also order by words or sign and mental approve (which is the heaviest) are the doors of action (kamma).
Not even the judge, but also those who install such as death sentence inlaws, order death sentence, or mental agree face the results of the kamma of killing. So one should be careful also when voting or watch news of "bad-mens-hunts".
Always good to address here is the Dhanañjani Sutta in regard of duties.
"What do you think Dhanañjani? There is the case where a certain person, for the sake of his wife & children ... his slaves & workers ... his friends & companions ... his kinsmen & relatives ... his guests ... his departed ancestors ... the devatas ... the king, does what is unrighteous, does what is discordant. Then, because of his unrighteous, discordant behavior, hell-wardens drag him off to hell. Would he gain anything by saying, 'I did what is unrighteous, what is discordant, for the sake of the king. Don't [throw] me into hell, hell-wardens!' Or would the king gain anything for him by saying, 'He did what is unrighteous, what is discordant, for our sake. Don't [throw] him into hell, hell-wardens!'?"
"No, master Sariputta. Even right while he was wailing, they'd cast him into hell."
Is it right livelihood?
Ordering death is no right livelihood, spoken in regard of the main question.
"But": There is nothing total wrong which the work as judge, althought surely not very conductive for the practice. Remember the devoted King who gave up judging and passed it to his servants, having faced than "noble" people are capable to lie for sensual pleasure.
The work as someone who orders the physical harm or even depriving from life, or depriving of own, is of cause wrong livelihood, at least at the moment he makes use of the power for such. So it might depend much on the law he has to execute itself as well.
Same as doing soldier is not perse wrong, but only if not firm abstaining from killing.
(Note, not given for trade, exchange, stacks and notorious doubter by for those after firm stand upwardly and toward liberation)
Upvote:-1
Judging presents a tremendous burden of responsibility. Witness the following very sad judgment from AN4.111:
“Sir, what do you do with a person in training who doesn’t follow these forms of training?”
“In that case, Kesi, I kill them.”
“Sir, it’s not appropriate for the Buddha to kill living creatures. And yet you say you kill them.”
“It’s true, Kesi, it’s not appropriate for a Realized One to kill living creatures. But when a person in training doesn’t follow any of these forms of training, the Realized One doesn’t think they’re worth advising or instructing, and neither do their sensible spiritual companions. For it is death in the training of the noble one when the Realized One doesn’t think they’re worth advising or instructing, and neither do their sensible spiritual companions.”
Note that the killing is indirect by non-support. Yet one reads finality in this judgement as well as a deep sadness that there are no skillful means for helping those with no wish to be helped.
Judges uphold and are constrained by the laws of society. As citizens, we can advocate for laws that support the common good with the least harm. Whether we exile, imprison for life or execute those who maliciously and grievously violate society's laws is a shared responsibility.
Upvote:-1
There are many suttas where the Buddha speaks as matter of fact about Kings executing criminals.
Suppose, Susima, that a robber, an evil-doer, having been caught, were shown to a king: 'This, your majesty, is a robber, an evil-doer. Decree what punishment you want for him.' And so the king would say, 'Go and — having bound him with a stout rope with his arms pinned tightly against his back, having shaved him bald — march him to a harsh-sounding drum from street to street, crossroads to crossroads; evict him out the south gate of the city and there, to the south of the city, cut off his head.' Then the king's men, having bound the man with a stout rope with his arms pinned tightly against his back, would march him to a harsh-sounding drum from street to street, crossroads to crossroads, evict him out the south gate of the city and there, to the south of the city, cut off his head. What do you think, Susima? Wouldn't that man, for that reason, experience pain & distress?
SN 12.70
If King Yama & the wardens of hell in MN 130 went to hell for punishing evil-doers then there would be no King Yama & no wardens of hell. There would be no one to stoke the fires and punish those evil-doers (who misconstrue Dhamma).