This is going to be controversial, but the punishment for this type of behavior needs to be public and painful. Very painful. The US Navy flogged sailors for relatively minor offenses up untill 1862. A good set of lashes in the public square with the attendant screaming might just give others pause before considering this kind of behavior. And after the modern version of the bosun' of old "lays them on thick", a lingering death on the gallows after a "short drop" ought to seal the deal on not being a murderous asshole for those in the crowd considering it. If not, well, rinse and repeat until the message is received and understood.