Not to defend the judge in that case in any way, but there is a question about whether/when it is OK or even desirable for judges to intervene "indirectly" with their power. For example (just an example, not suggesting this is how it was), suppose in the case you mention that the mother was suspected of being abusive or negligent, but that a prosecutable case couldn't be made for that, and that the traffic tickets were used merely as a guise for the sentencing. If that were the case, I don't think judges actions would seem quite so harsh, and might even seem appropriate (it doesn't require a massive stretch of the imagination to think of a case where this is true).
And no matter the reasoning (or lack of it), the fallout of this (where the kids are harmed/molested in foster care) is hard to attribute to the judge. If the mother had been a serious threat to the children and the judge had sentenced her based on truly unquestionable reasons, they still might have met the same fate in foster care. As part of the legal system, the judge basically has to have complete confidence in the integrity of the foster care system (and it isn't his job to ensure that integrity).