The “children” in this case were victimized by a lack of proper due process.
This is quite different from saying they were treated unfairly on a cosmic justice scale.
Let’s look at an example. Let’s say a man is convicted of and executed for a murder he did not commit. This was a failure of the justice system to properly handle his case. He has a legitimate right to complain about that as a miscarriage of justice.
But let’s also assume this same man had committed several other murder for which he was not arrested. He deserves to die for them, so to my mind thereby loses his right to claim that he was treated unjustly on the scale of cosmic justice. In fact, the element of poetic justice starts to creep in.
This is of course all theoretical, as humans don’t have access to knowledge about cosmic justice.
You are quite correct that this judge has tainted every single case in which he was involved. Which is why all of them are being re-examined, as they should be. IMO every benefit of doubt should go the child in each such case. Generous compensation should be given those who were mistreated.
My only point is that if a child would have received a similar sentence from another judge who was not corrupt, then that child has no right (on the cosmic justice scale) to claim he/she received an unfair sentence. Unfair trials often, indeed in America probably most of the time, produce a just result.
But, as you say, we do not access to knowledge about cosmic justice. So how could we know for certain? If it is possible for a person who is innocent only of the one thing (but guilty of other crimes unknown for certain) to be convicted and sentenced unjustly for that one thing, who's to say it couldn't happen for another who is innocent of any crime whatsoever?
Willingness to accept the conviction of innocents in the name of "cosmic justice" is supporting actual injustice "just in case". We should do better to take care so that ridiculous laws and corrupt judges do not undermine the concept of guilt beyond all reasonable doubt. Follow that path and eventually guilt and innocence become subject to the opinion of the powerful.