There are no absolutes when it comes to criminal punishment. There is always an exception to everything.
That said, I've long thought if you stop treating people like animals, they'll stop acting like it. I've never studied prisons, or psychology, or anything remotely related. But I genuinely believe this philosophy is investigating.