Dahn Batchelor has written a thorough post on the death penalty.
I note that when it comes to killing human beings, the general population doesn't typically care whether the target suffers or not. Because if you start to care, then you develop empathy for your target. And if you develop empathy for your target, then you have to start accommodating that victim, and you have to start thinking about their welfare. And if you have to think about their welfare, then you have to start questioning whether death is in their interest.
And of course, it's not. Death is never in an individual's interests. (And by saying that, I'm not saying that you have to keep people alive with extraordinary means).
Dahn describes how a muscle relaxing drug is used to immoblize the prisoner. He theorizes this is to make execution less unpleasant for those watching. If the victim wakes up during the execution, he won't writhe in pain and fear.
Painkillers administered to the fetus in late-term abortions are often done for the mother's benefit. The mother does not want the baby to suffer. But I don't know that anyone has every actually studied fetal pain during abortion. It could undermine the "right to choose".