I don't work for prosecutors and I don't believe the justice system is stacked against defendants. More often than not I'd say that victims have the system stacked against them, particularly those of sexual assaults and children -- with the commonality being much of the evidence is frequently the word of the victim. Tremendous priority given to protect defendants from reputation/character/criminal history/prior allegation history. Victims are lucky if they get so much as a postage stamp of privacy regarding even the most mundane details of their past. There's a reason predators hone in on certain victims -- because they know nobody's going to believe a "bad kid". Kids who lie about having finished all their homework or "the dog ate my homework" is actually used against them to create doubt of their credibility when they've accused a step parent or mom or dad's significant other of abusing them. Happens all the time. Stop and think if you yourself or your children ever lied about a homework assignment. Does that mean you or your child is a habitual liar of epic proportions?
The goal of a good justice system should be discipline and punishment of those who commit crimes and deterring others from committing similar crimes. Incarcerating people who did not commit the crimes alleged is definitely not just. That explains why the scales are more heavily balanced to the protection of the accused. Taking away someone's liberty is extreme and should only happen when the elements of an alleged crime are proven beyond reasonable doubt in a court of law.
Do mistakes happen, yep. Have there been those pushed through the system and convicted wrongfully because of bad actors in the process, yep. Is that the norm? I absolutely don't believe so, and certainly not anywhere near a great proportion of prosecutions.
I've also learned how wildly different what happened in X trial is compared to a news article or news story I've seen. Many times I understand how and why that happens is because the reporters don't have the ability to sit through much more than an hour at most of even some of the "biggest" cases. So much of what happens in these cases has actually happened many months, even a year before the trial in countless pretrial evidentiary and motion hearings that the judge has issued rulings on. Reporters aren't given the luxury of time to devote to following cases for anything but "important" or "newsworthy" dates. The tedium of arguments about arcane details of case law, etc. don't get covered. If reporters are able to take the time to sit through an entire morning or afternoon of a trial it's likely opening arguments, but most likely closing arguments and sentencing. Opening arguments and closing arguments are not evidence, they're attorneys explaining how they see the case. Much of what happens at sentencing isn't evidence either.
I've walked into courtrooms many, many times during a trial that I actually know many of the details involved and found myself completely lost as to what I am seeing and hearing in front of me at the moment. It's not that it's dramatic and exciting with twists and turns like TV or the movies. Most trials are about as exciting as watching grass grow at least 80-percent of the time or more. If a reporter comes in to observe for the slot of time they have to gather details for their story and all they have to work with is the bulletpoints of the charges and possibly some statements of dispute a defense attorney has made to the press earlier in the case and the slot of time the reporter has available to come in and observe the trial live involves a very narrow viewpoint of complex testimony or evidence that short amount of observation can skew their perspective and opinions greatly. When that viewpoint gets broadcast out to the public in their reporting it can immediately shape how those who see or read their report now view everything about the case going forward. Virtually every single case reported on in the press needs far more nuance and far more detailed understanding in order to give something more like what the public expects is an honest, detailed and factual accounting. That's not malicious or deliberate on the part of the press the majority of the time either, it's simply an economic reality of the news business and how they need to utilize limited resources to report the news and keep audiences tuned in.
Miscarriages of justice are awful on so many levels. I cannot fathom the horror and tragedy of being wrongfully incarcerated. Their family and loved ones' suffering is traumatic, too. The victim(s) are also victimized once again when this happens because they're not getting legal redress for their loss or suffering. Communities can be at risk with the real perpetrator still free to victimize others. In my experience most people working in the justice system are working towards justice, even if they're not perfect, make mistakes and don't get everything right all the time.