I have no evidence that the death penalty prevented murders, but I sense that nowadays there is a more casual attitude to 'accidental' murder, as in the number of people who are done to death by their partners, or stalkers, or people caught in illegal acts; they barely make the headlines. From what I remember of executions in the fifties and sixties they were for people who had murdered in cold blood, intentionally and with malice aforethought and the death penalty was clearly no deterrent. But there didn't seem to be the same attitude to beating up people and going too far; most people were able to control themselves before causing death, because of the consequences to themselves. That restraint seems to have gone.
Perhaps the threat of the death penalty would rein in some of the violence?
I don't know.