Getting revenge is something that almost everyone in those situations wants to do; it satisfies deeply. What you describe is by many people called "hitting back," which is hard to see as something negative, and definitely not equivalent to what he went through as a child.
"Bully beats victim," "Victim retaliates;" one is obviously less bad than the other. It's not like the victims in his story are hurting random, innocent people.
My point is that there's an underlying moral lesson to the bullying he received: the idea that the pain and abuse will lead to positive results in the child. And further that the abuse isn't just punishment, but that abuse itself can lead to virtue. That's why it's applied to every young boy systematically.
In his books Dahl doesn't just describe revenge, but describes it as a way to actually correct behavior, as a way for the universe to give the powerful a lesson. He's certainly turning around the power dynamic, but the moral justification for abuse remains intact.
"Bully beats victim," "Victim retaliates;" one is obviously less bad than the other. It's not like the victims in his story are hurting random, innocent people.