Executions are different. People are not afraid to admit that they support executions because they like knowing that hated people will suffer. That is not something I will consider acceptable under any circumstances. If there were any evidence that capital punishment served a purpose beyond feeling good I might change my tune. But there isn't, so I won't.
You yourself admitted executions serve no practical purpose, so your self-defense hypotheticals are irrelevant.
We should not torture them on purpose but besides that I do not particularly care if they suffer or not during execution.