You might know the movies but do you know the book…
In 1964, Roald Dahl wrote “Charlie and the Chocolate Factory”, then in 1971 he wrote the sequel “Charlie and the Great Glass Elevator”.
These in turns inspired three movies: Willy Wonka & the Chocolate Factory (1971), “Charlie and the Chocolate Factory” (2005) and the yet to be released “Wonka” (2023).

“The story was originally inspired by Roald Dahl’s experience of chocolate companies during his schooldays at Repton School in Derbyshire. Cadbury would often send test packages to the schoolchildren in exchange for their opinions on the new products. At that time (around the 1920s), Cadbury and Rowntree’s were England’s two largest chocolate makers and they each often tried to steal trade secrets by sending spies, posing as employees, into the other’s factory—inspiring Dahl’s idea for the recipe-thieving spies (such as Wonka’s rival Slugworth) depicted in the book. Because of this, both companies became highly protective of their chocolate-making processes. It was a combination of this secrecy and the elaborate, often gigantic, machines in the factory that inspired Dahl to write the story” (Wikipedia).