The trouble in my opinion with some judges in my country and with the police in some countries is, that everybody just assumes, that because they work for law enforcement, they have a high level of integrity. But when you look how they are educated, the subject "integrity" is not even touched (I even don't think, that it is taught in law schools).
In my country, when somebody is already a judge, there is nearly no chance at all, that this person will be held accountable for misjudging. I think, not even the highest courts can replace a judge that repeatedly and knowingly is bending the law. At least I don't know of any case at all where a judge was punished or even replaced. And don't think, that all judgments are correct in my country.
In my opinion, when there is one thing to be learned from history, it is that any person can err and even the best meaning persons can change into dictators over time depending on situations.