That works only if the person has fear of punishment. Freud's ideas might be a bit off..the whole levels of learnign thing is a bit off for me, but if you consider it as a 'label' for morals vs immorality (Id vs. Superego), then it works. Basically this is it.
If you are so fucked in the head that you would do something like this, then no amount of deterrents would stop you. If the death penalty was "death by torture over a 3 week period", then this guy would still have done it...the death penalty will stop the average joe (who wouldn't do anything to deserve it because of his/her morals anyway) but does SFA to deter the really sick ones.
Violent crimes have a way of escalating...assault, aggravated assault, sexual assault, rape, rape causing bodily harm, rape causing death. I can see the death penalty possibly slowing down this progression, but not stopping it.
We're arguing towards the same point... this piece of shit should fry. In you mind, this will help stop others, in mine..he'll be dead, it won't stop anyone else, but it doesn't matter...he's still dead