What he did was gross and wrong and he is being deservedly prosecuted for it.
But also, how is this even something that could happen. Can he possibly have thought that this would never come out? I mean, I can only imagine that he must have been in some kind of horniness fog that completely obliterated his judgement, because at some point he must have become educated in order to be a teacher, so he's probably not a moron.
Honestly, knowing that the odds were very good that he would be caught, humiliated, and punished, if he STILL couldn't control his behavior, then maybe someone should just take him out behind the shed and do the merciful thing.
John Douglas pointed out in one of his books, about a similar situation where a school principal was tickling some of his students feet, that the problem isn't really the behavior itself, creepy and vile though it is.
The greater danger is that if one of the kids says something to the teacher that makes him think he's going to tell his parents, the guy might panic and escalate from fetish behavior to a violent crime in order to save his career.
Which is apparently something that happens a lot once adults start trying to interact inappropriately with children. These guys fantasize that they have a relationship with the child, in which the child has an adult understanding of what's going on. Then in reality when the child freaks out, and doesn't play the role, the adult becomes confused and frustrated and lashes out violently in a way that can't be covered up, and instead of the imagined romantic interlude, they suddenly have the choice of either going to jail, or murdering the kid to shut him up.