In the case of Colombia, there are independent investigation agencies that aren't subject to any of the three branches, and specifically the judiciary branch has a committee that investigates disciplinary trespasses by judges. Also, there are three separate "Supreme Courts": one handles typical everyday cases, another handles conflicts between citizens and the government, and another handles Constitutional violations. So there are several protections against a rogue Court.
In Spanish, we have these words:
hay (there is) ahà (over there) ay (ouch)
And it's infuriating when people can't pick the right one in writing.