But you can, theoretically, have private prisons without perverse incentives - just like you can have private grid operators and power plants without perverse incentives.
It just requires regulation.
Pretty much everything does.
We can't even have medicine without regulation to make sure people aren't filling pills up with nothing (or toxins) just to make an extra couple percentage points.
We don't have private justice, or private law enforcement. Why private prisons?