Sorry - wrong choice of words, what I was trying to say was that in previous times (many centuries ago!) - this was the sort of punishment that would be meted out. You’re right of course that it is savage. Perhaps a 21st century approach would be confinement without privileges in the hope that...
Better still - use an ‘oubliette’. This was a medieval French punishment that required the offender to be thrown from a chimney type hatch into an underground pit with concave walls, thus making it impossible for him to climb out. There he would remain until his demise - open to the elements...