I'm still not convinced. If nothing else, if someone is executed they won't be able to reoffend.
And basic understanding of human nature means that punishments often work. If I knew I would be beaten (corporal punishment) for jaywalking or something then I certainly wouldn't do it.
The threat of punishment doesn't work for crimes of passion or insanity or sheer desperation, but otherwise it certainly plays a role.
If there were no punishments for anything at all, crime would certainly increase. If people knew they would only get a day in prison for stealing a million pounds, I think a lot of people would try it. If people knew there would be zero consequences for rape, rates would increase.
So yeah, countries like Singapore manage to ensure low crime rates through the use of very harsh punishments (alongside high gdp, relatively low inequality, a strong focus on education etc).
A debate can certainly be had on the morality of it and there other factors at play as well, but I do think punishment is effective.