Generally agree but not that they are deterred by punishment alone, no. They will do whatever they get away with. Which would imply - “the right thing” must also be objectively better to the individual, not only backed by moral+force, for it to work generally.
(Not to mention the sociopaths are already present in politics and police. Drawn to power)