You have a well-to-do neighbor who is perpetually, irritatingly sure that all is well-ordered in the great chain of being and that her privilege is deserved. You worry about her, but you worry more at the prospect that her child may grow up to be reflexively certain that the market will right all wrongs and the poor deserve to be so.

A remedy lies at hand, though: Give the kid a copy of Charlie and the Chocolate Factory, and all will be well.

In the half-century since Roald Dahl’s novel first appeared, no other popular book ostensibly aimed at young readers has been quite so disdainful of privilege and the received idea that things are as they ought to be. Indeed, those who remember the story from its movie adaptations, dark but not quite dark enough, may be surprised to gauge how sharply Dahl waged class warfare with his pen.

Charlie Bucket is poor even in an England not far beyond the rationing of the war years, living with grandparents who subsist on cabbage soup when the times are good and on air when they’re not. Still, the Buckets skimp and scrimp to buy Charlie one of the secretive candy maker Willie Wonka’s chocolate bars, hopefully one with a golden ticket guaranteeing admission into candy paradise—or at least into a factory not quite so grim as the smoke-belching factories surrounding it.

The rich kids are, of course, buying up chocolate bars to score those tickets at a much faster clip than the poor kids. When there’s only one prizewinning ticket left to claim, Grandma Georgina says, bitterly, “That ticket’ll go to some nasty little beast who doesn’t deserve it!” But Charlie, through some miracle, gets his break—only to find himself in the company of a bunch of thoroughly disagreeable 1 percenters who would benefit from a spell in the rice paddies.

Wonka—shadowy, elusive and fantastically wealthy himself—is no fan of the undeserving upper crust. He’s something like Bill Murray’s character in Wes Anderson’s film Rushmore, who urges an audience of scholarship students to “take aim at the rich kids.” Dahl_CoverYet, as Charlie soon discovers, the rich kids can’t sabotage themselves fast enough, victims of their own greed and stupidity, and one by one, they’re punished in nicely appropriate ways.

It’s telling that once Augustus Gloop, Veruca Salt and the other twerps are out of the picture and Charlie is the ascendant lord of the Oompa-Loompas (whose long chant on nose-picking and gum-chewing both screenplays fail to air at sufficient length), he gladly shares his good fortune with his family—and without lawyers to compel him to do so.

Meanwhile, the miscreant children of privilege, if stretched and mangled and covered in garbage and otherwise worse for the wear, live to tell the tale, given a chance to rethink their positions and join the class struggle on the side of the working poor and the Oompa-Loompas alike. It’s a surprising bit of subversion, to be sure, making Charlie and the Chocolate Factory the best kind of children’s book.

Gregory McNamee is a contributing editor at Kirkus Reviews.