In U.S. history only 8 federal judges have been convicted and removed. In a normal year the number is zero, out of ~870. For state judges, about 11 are removed per year out of ~30,000. They can be held accountable, but it takes something extraordinary, and worst case they retire early. If a judge confesses to full self-replacement that might do it. Too many load bearing emdashes wouldn't be enough.
To be removed as a judge you have to do shit so egregious, like taking kickbacks from the prison industry to sentence children into their custody and work programs, to the point it is an open secret (where your own Facebook shows you hanging out with the CEOs of such companies, and your conviction rates and sentencing for juveniles is so far on the curve it couldn't possibly be coincidence) and even then it will take YEARS, all the while you go on doing it.
All officers of the court have various forms of immunity. All of the rights, rules, and statutes they are required by law to uphold only goes as far as how much of that in group someone is, or how much money someone has to uphold their rights when infringed upon.
In practice the entire system has become political, corrupted or both. As a result, the only rights most people have are those where officers of a court are only limited by where their immunity ends. They can and do violate the law and ignore large parts of it if it suits them.
Assuming someone has the resources to even get any oversight at all, in most cases those involved will investigate each other and decide they have done nothing wrong. Even in the unlikely event that someone proves an illegal act, they will just claim immunity.