Prison may work as a deterent in some cases, and rehabilitation may work in some cases, but if Prison was totally effective as a punishment and a deterent to stop people offending and re offending, there wouldn't be any more crime/ criminals.
Likewise the death penalty does not stop people commiting heinous crimes.
One may think that prison and the death penalty are the right and proper punishments but they will never stop crime. Those countries that have the harshest regimes and the death penalty still have prisons full of criminals and regular state killings.
It would be good that you were out of a job Derek (in the nicest possible way), but there will always be nasty people on this earth who don't care or don't think and whatever one would like to do to them, the problem will never be eradicated.
The judical system in this country or anywhere on this earth will never be perfect, or results 100% accurate because Humans make mistakes.
If you think that it is acceptable that a few innocent people are put to death in error, in order to satisfy your feelings of revulsion, revenge, a suitable trade off/punishment, how would you feel if one of your family were hanged for something they did not do.
You can debate hypothetical situations in a perfect judicial system, but we do not live in one and there will never be one.