But what if they continue to sin by wilfully dwelling on the subject in their mind? Perhaps, in st. Pius X judgement, such people regularly dwell on it and that that part is not rehabilitatable. In other words, actions are preventable by locking them up for life, but thoughts are not preventable. As such, the death penalty would be more charitable to help them stop sinning and reaching a deeper pit of hell when they die.
There are lots of people in habitual sin. So, are sins of thought now worthy of the death penalty? In that case, you could safely execute 95% of the earth's population. You can't make decisions about capital punishment based on considerations like stopping them from reaching a deeper place in hell. That's up to God. God could strike them down whenever He chooses. And, if He doesn't, maybe it's because He feels the person does in fact deserve a greater eternal punishment. We are not in a position to make those kinds of decisions. Using criteria like that to argue for capital punishment opens up a nightmarish can of worms. Why can't I take it upon myself, then, to execute my neighbor who's a chronic blasphemer or adulterer? Ah, he's never going to change, so let's just execute him. But, you know what, people CAN change? Or do you not believe in the power of God's grace? Even the most hardened sinner can be converted. Even if their sinful INCLINATIONS and temptations to sin never go away, they could still get to the point of regretting their actions and having sincere contrition and at least FIGHTING their sinful condition.