But (approximately) nobody commits a crime on the assumption they will get caught, so it pretty much doesn't matter what the punishment is. The way to move the needle is to change the assumption about getting caught. The closer that tends towards guaranteed, the less chance people will even make above calculation in the first place.
US violent crime has plunged over the last 40 years, and the murder rate has been chopped in half since 1980, all the while death sentences have declined to ~45-50 year lows (there has been roughly a 90% reduction in new death sentences since 1999). The dramatic plunge in new death sentences over two decades hasn't coincided with any uptick in the murder rate or violent crime.
There's a theory that violent crime has plunged over the last 40 years because of leaded gasoline being phased out: the lead was in the air and environment and giving everyone low-level lead poisoning.