The thought experiment in Peter Moskos's In Defense of Flogging bears some consideration.
Prisons are very badly run, in fact, criminally run. One prisoner should have no AUTHORITY over another prisoner. The establishment of a system in which the stronger prisoners have authority over the weaker is a crime against humanity, in my opinion, and the perpetrators of that system should all be in prison themselves.
A system of default solitary confinement, where good behavior earns a prisoner time outside his/her cell, is the only way to run a prison. Anything else puts authority into the hands of the stronger prisoners.
As for flogging, yes. Put flogging into the mix. I’m all for adding flogging as a punishment option.