This episode has a weird moral. I get what they were going for, with the Arthur and D.W. angle it's presented like Arthur getting a taste of his own medicine and learning it's not nice to prank D.W. and scare her for fun.
But siblings teasing each other is like, expected to some degree. It's not exactly nice for Arthur to do that but D.W. has done plenty of selfish and annoying things to him too.
So I feel like the whole thing with Ted, the crossing guard, gets kind of lost as a moral. Obviously the show isn't going to tell kids to disregard authority or assume adults are joking, but as a kid I genuinely couldn't tell it was a joke. He could see Arthur and Brain were confused and stressed out by it and he just kept going "yeah I have cameras everywhere, I saw your wanted poster by the police station, I'll send my goons after you".
Because yeah he was just joking, but Arthur and Brain didn't know that and they thought it was real. And the moral is just like "obviously he should have been able to tell" since D.W. didn't believe it. Ted's jokes went beyond just messing with the kids and gave them actual nightmares and made them scared of him. They don't know this guy and he's in a position of authority, why would they immediately think he's joking?