Breaking their will through punishment, both mental and physical would IMO be a far more effective measure.
That strikes me as cruel and inhumane. The whole point of execution is that it’s painless. It’s not about punishing them, it’s about ridding us of having to deal with them. We shouldn’t torture criminals for their acts.