And if you really believed in human dignity, don't you believe that exerting that sort of punishment is not only cruel to the perp, but to the prison guards who have to handle them?
And what of the money we spend on prisons instead of our children? A .45 only costs a few cents.
If you want to do that, you'd have to sterilise all their descendants.
.. otherwise known as eugenics. Not that that is necessarily a bad thing. In fact from the utterly callous perspective of evolution and the long term interest of larger society, this is the most clear and consistent position, IMO.
It's mostly nature, not nurture, and we've all known that for a very long time, although it's still too taboo to admit. So people such as the criminal in the story are bad mutations to be rejected, along with any children.
So that's what we'd do if we were really serious ...