I think that's being way too charitable.
In a world where people are incarcerated on a scale unprecedented in all of human history, and where prosecutorial success is measured by number of scalps taken, the assumption that this is plain malice designed to let the state rob a few more individuals of their freedom makes much more sense than it all being just a big pile of incompetence and misunderstandings.
And crimes weren't solved, people not prosecuted, criminals not punished
For much of history life didn't even exist, that's not an argument for or against anything
Plus majority of it never went through tria, because trial is just too much risk. So, there are not all that many actual checks and balances