> You've argued over the years that the justice system is in fact a justice system, not merely a legal system. In other words, you believe it's mostly fair.
To the contrary, I think it's incredibly unfair. But probably for different reasons than you do. For example, thousands of people every year are sentenced to an average of over six years in prison for possessing a firearm as a felon. It's "fair" in the sense that the error rate for those convictions is almost certainly negligible, because proof only requires showing possession and a fact that's a matter of public record. But in my opinion the crime and the sentence are unfair: we shouldn't take away the rights of people who have served their time, and six years is a sentence more appropriate for murder than possession of anything.
I think the under-funding of public defenders is a travesty. But most public defenders will admit that most of their clients are guilty, and they spend most of their time ensuring their clients plead to the right charges and get a fair shake at sentencing. It's "fair" in the sense that the system mostly convicts the right people (except at the margins, which is why public defenders should get more funding) but it's "unfair" in the sense that sentences are too long and many of these crimes shouldn't be crimes.
> One of my worst fears is being accused of some kind of crime, like cybercrime or anything else.
You should be afraid! Take, for example, 18 U.S.C. 1001, which makes almost any sort of false statement vaguely related to the federal government a felony. It's "fair" in the sense that there is almost never any doubt that the accused made the false statement in question (either in a recorded interview with an FBI agent, or in in writing in some official paperwork). But it's "unfair" in that it's often used to trap (or, more often, threaten) people who only did something marginally wrong. E.g. lying to a federal agent to conceal a workplace affair.
> Yet on the flipside, it seems to work, and we seem to live in a pretty decent and free society. I'm not sure how much or little we should credit the courts for that.
That's a really fundamental question. I think the way to look at it is to look at what happens in places without enforcement of certain kinds of conduct. E.g. sex crimes in rural India or Pakistan. Why do victims plead for enforcement of the laws on the books in such situations? Partly retribution. Probably not really deterrence--even with enforcement, the odds of getting caught are so low that there can't be much of a real deterrent effect. The biggest value of punishing crimes is, in my opinion, creating social norms. The overwhelming majority of people aren't "good" or "bad," but they will readily follow social norms that are visibly enforced. The primary benefit of putting people in prison for robbery thus is showing everyone that it's conduct that is so unacceptable that we put people in prison for it.