There is no wicked man who could not be made good for something. One has the right to put to death, even as an example, only someone who cannot be preserved without danger.
Gist of Idea
Only people who are actually dangerous should be executed, even as an example
Jean-Jacques Rousseau (The Social Contract (tr Cress) , II.05)
This formulation implies that we could execute a dangerous person as a deterrent, even though they were not guilty of this particular crime. I suspect that Rousseau was too nice to go through with that.
Rousseau,Jean-Jacques: 'The Basic Political Writings', ed/tr. Cress,Donald A. [Hackett 1987], p.160