Although there's been much talk of the technical challenges involved in bringing the book to the stage, the real difficulty lies in preserving the story's humanity amid a welter of special effects.
The success of Sam Mendes's production lies in its reminder that, for all the razzle-dazzle of Mark Thompson's sets and costumes, Dahl's story is essentially a moral fable.
David Greig's book goes to great pains to keep the narrative clear while shrewdly tweaking the original. Greig heightens the suspense so that Charlie's hopes of discovering the golden ticket that will give him a tour of the chocolate factory are dashed earlier than in Dahl.
This version also builds up the character of Charlie's Grandpa Joe (the angularly funny Nigel Planer), who here becomes a bed-bound Billy Liar. Even the character of Willy Wonka, the eccentric capitalist who seeks to monopolise the world's chocolate supply, is given a darker tone than you find in the 1964 book.
The show also depends on delayed gratification. Most of the first half is taken up with the story of Charlie's impoverished family, relieved by inserts of a garish TV spectacle showing the winners of the golden tickets. The only problem is that Marc Shaiman's score never achieves liftoff until Charlie himself becomes the lucky fifth recipient.
In what seems like a concession to the global market, the four children who get to accompany Charlie on the tour are also of mixed nationalities: the greedy Augustus Gloop is Bavarian, the spoilt Veruca Salt defiantly English, the gum-chewing Violet Beauregarde Californian and the computer game-obsessed Mike Teavee a product of American suburbia.
It doesn't matter much except that the lyrics, co-written by Shaiman and Scott Wittman, initially get swallowed up in the parody of national musical styles.
But once we reach the factory, the show never looks back. In creating a sumptuous visual feast, Thompson's achievement is to adopt a number of different devices while creating a harmonious whole. The subterranean caverns of the Wonka factory are evoked through projections (by Jon Driscoll) that have the dark intricacy of Piranesi drawings.
Each chamber also has its distinctive character. The Chocolate Room, where the Germanic Gloop gets his comeuppance, has the sylvan seductiveness of Klingsor's magic castle in Wagner's Parsifal. Pursuing the Wagnerian parallel, when we get to the Nut Room we are confronted by puppet-squirrels beavering away like so many furry Nibelungen. Meanwhile, the diminutive, equally hard-working Oompa-Loompas are evoked through a trick which, although quickly detected by my eight-year-old grandson, is nonetheless highly effective.
What stops the show being overwhelmed by spectacle is the performances: above all, Douglas Hodge as Willy Wonka. Kitted out in plum-coloured tailcoat, bottle-green trousers and black top hat – exactly as Dahl prescribes – Hodge has the great gift of being engaging and sinister at the same time.
Hodge flashes warm smiles at the children and even the audience when, at one point, he rises up from the orchestra pit.
He also puts across the show's best number, Pure Imagination (originally written by Newley and Bricusse for the 1971 movie), with a sincerity that conceals its paradoxical nature in a production that pre-empts our own fantasies.
Yet Hodge's Wonka, calmly watching four of the children get their just deserts – or perhaps be turned into desserts – and fiercely rounding on Grandpa Joe when accused of offering Charlie a "measly" reward, shows a dangerous edge. Less whimsical than Gene Wilder in the movie, Hodge gloriously reminds us that inside the beneficent Wonka lurks a testy authoritarian.
Of the four children playing Charlie, I saw Jack Costello, who displayed a sprightly assurance. Among the supports, it's worth singling out Alex Clatworthy and Jack Shalloo, who lend Charlie's parents a genuine sense of protective kindness.
All this is testament to Mendes's skill in masterminding a lavish bonanza of a musical without letting us forget that Dahl's book is a morality play in which vice is punished and virtue gets its edible reward.
guardian.co.uk © Guardian News and Media Limited 2010
image: © John Loo