Public punishment could be better in warding off repeat offenders, even minor ones, shame is a great deterrent, as shown by classic and even modern revivals, such as the "Ted Poe" sentences from when he was a judge in Texas.
The point of "justice" and the like, on a humanist level, has the function of keeping dangers of society out of the workings, however it is most efficient, and by what means we can ensure the innocent are not punished are of the most importance.
Death is one option, especially in times of crisis, what is gone
is gone.
Slavery is a sticky situation, it negates the loss we take by keeping the prisoner alive, but when we allow an easy means to escape our own responsibilities (creating an "underclass" that does our work for us) there are always those who will abuse this, just see the Reconstruction Era and beyond from the American South, by creating a cheap workforce it was in the "law enforcement industry's" best interest to make false charges to shore up the numbers of potential workers, slavery under a different guise, but still the exploitation of another to line their own pocket's.
I would say, for very small, or for societies already nearing their breaking points where the criminal's uprisings are always a threat, death.
For an ideal fictionalized world where we could weed out all greed and laziness in our own system, slavery.
For a the rest of the real world, I would say the ideal is to make the inmates work just enough to break even with the guard salaries, prison upkeep and the like, there is no incentive to capture prisoners unnecessarily, and no undue strain on the nation's wallets.
also gladiators are kind of cool.
