I go back and forth on this. In the Criminology class I took (years ago), the book and instructor pointed out that, in the Middle Ages, during public hangings of pickpockets, pickpockets would work the crowd. The severity of punishment doesn't deter the criminal bent on committing a crime.
The county in Arizona where Joe Arpaio was Sheriff, had a very low recidivism rate, however, whether It was because the ex-con's turned a new leaf or, just moved away to avoid being incarcerated in his county is anybody's guess. His policy was to place the arrested criminals in tents, rather than in air-conditioned buildings....and wear pink uniforms. Perhaps all counties should put prisoners in pink leotards and wear tutu's and see what happens. Embarrass them into behaving.