They can if someone petitions for it.
> The mother petitioned the court to have her minor daughter sterilized
And I can petition to have you sterilized. If the judge accepts it you will not be able to hold him responsible. He does not need to listen to you nor do you need to know about it.
> The general rule is that judges can't be held personally liable for mistakes they make when acting in their official capacity as judges.
Meanwhile doctors, drivers, etc can be held personally liable for mistakes they make while working.
(Note: the US and what it did and does, does not exist in isolation; these outside-US developments are germane. Also, it was evil and cruel and contra-productive, but that wasn't a problem, because since it was what you would do, in case of war, it had to be done.)
More specifically, they can't unless they do, but if they do then that's okay. Which seems to simplify to "they can".
My claim is that "a US judge can order to you be sterilized without your knowledge and you can do nothing about it nor can anything be done to the judge." is not like the previous statement, because it only applies in an extremely limited (at the time; possibly not at all now, I don't know) set of circumstances with which an ordinary layperson would not be familiar.
The difference is that you can know about it and defend yourself. There are hearings and chances to appeal. The sterilization in this case was done without the girl/woman's knowledge. It's impossible for her to appeal, because she didn't even know about it. Even worse is that her guardian would be the one who would decide to appeal.
Anyone can petition anything. Granting a petition that does something that would violate someone else's rights despite them not having done anything wrong is fundamentally wrong. Forced sterilization, especially without your knowledge, is akin to capital punishment. If you get it wrong then nothing can make amends for it, because you cannot undo it.
For example, the judges involved in the “cash for kids” scandal had their rulings reviewed using a rule established in the 18th century:
> Acting under a rarely used power established in 1722 and reserved for extraordinary circumstances, known as "King's Bench jurisdiction",[58] the Pennsylvania Supreme Court appointed Senior Judge Arthur Grim of the Berks County Court of Common Pleas as special master to review all juvenile cases handled by Ciavarella
I really can't imagine those rulings happening today. Did you know? In May 2020, Maryland passed into law a repeal of the crime of sodomy, effective October 1st, 2020.
And there are plenty of similar laws still on the books even now:
https://en.wikipedia.org/wiki/Sodomy_laws_in_the_United_Stat...