Japan is a bit of both. Prosecutors are extremely reluctant to bring cases to court if a conviction isn't guaranteed (losing a case is extremely embarrassing), and for this reason judges almost always side with them because they assume a prosecutor wouldn't bring a case against someone who is not definitely guilty.
Basically in Japan they err on the side of letting criminals roam free if it's not an open-and-shut case in front of a judge, but it sucks for the (very few) who are wrongfully convicted, because nobody will believe them. Especially because you'll never get the government to admit they wrongfully convicted someone.
It's easy to find examples for both:
https://www.vox.com/world/2015/12/13/9989250/japan-crime-con...
https://www.latimes.com/archives/la-xpm-2007-nov-09-fg-autop...
(although I would like to make clear -- in any large country, you will find examples of both)
And while the kangaroo court thing is maybe a bit too true to be comfortable with, I'd wager Japan errs heavily on the side of not bringing potentially contentious cases to court.