Almost all software is broken, in fact. A real field of engineering would prohibit most of the stupid shit idiots claiming to be programmers do before even reaching for the other issues.
Law enforcement embraces rehabilitation, prevention, and other mechanisms as well as simple punishment.
Seems rather disingenuous to make a claim that negative reinforcement doesn’t work, vis-a-vis not having to be in jail.
Besides, pickpockets used to be hanged. Didn't stop them.