If you're willing let deterrence mean something other than its regular meaning...
It has a very specific meaning...it deters THAT INDIVIDUAL. The death penalty ABSOLUTELY deters an offender from killing someone heinously, ever again.
Beyond that, I've never viewed criminal justice as a form of overall deterrence, anyway. Criminal justice is only, EVER, a deterrent for offenders who've been charged and convicted. It has very little impact, overall, on other offenders.
It's a false map that you and others have set up to create an unworkable means of determining efficacy. A better method is this:
Does crime go down when we incarcerate/execute the right offenders?
The answer? Absolutely.
The next question is: Is their sentence an appropriate measure of the impact their crimes caused to the victims and society as a whole?
The third question is: Do they recidivate after incarceration? That last question should drive programming behind bars, as well as determinations about sentence length and appropriateness.
Only a tiny percentage of society (around 3%) will offend, anyway. That's the only group we should be focusing our criminal justice sights on.
As far as prevention/intervention, if you want to discuss those subjects, I'd be happy to, but it's a mistaken in terms to suggest that incarceration and/or the death penalty have an effect on other individuals in society choosing whether or not to commit a crime. I don't even believe that "deterrence," as you define it, has a role in the discussion.