The battles in the courts over the past 5 years have been around challenges to various execution protocols based on their cruelty and pain - and those have been largely successful.
A handful of sleeping pills and a solid dose of Fentanyl will do it.
My understanding of the death penalty is that it is intended as violent punishment and is done gruesomely for the purposes of revenge. Read any thread online about a bad crime and you will see mobs of people calling for violent, public murders of the accused. It's human nature for a lot of people and something I think a civilized nation would immediately outlaw, especially ones that pride themselves on not doing "cruel and unusual punishment". I remember reading that the death penalty in the US doesn't fall under that category merely because of the 'and' clause and the relatively common nature of gruesome murders by the State in the US.
[citations]. It seems that states without the death penalty have lower murder rates, suggesting the opposite forces are true compared to your post (edit: i.e, it might even mean that a place with state-sanctioned/performed murder is more likely to have murders).
https://deathpenaltyinfo.org/deterrence-states-without-death...
In practice, though, it seems that most people who support death penalty do see it as a punishment intended mainly for deterrence, and what they refer to as "justice" (i.e. cathartic vengeance - "torturing someone who made me feel bad makes me feel good").