Another aspect of the dark back story could be the nature of the chocolate factory itself. It's a place full of wonders but also danger. The various rooms, like the fizzy lifting drink room, can be quite dangerous for the unruly children. This danger could be a metaphor for the unpredictability of life and how one wrong move can lead to consequences. And Wonka, as the creator of this world, has set up these challenges perhaps as a way to test the children or as a result of his own jaded view of humanity. He has seen the worst in people when they tried to steal his secrets, so he wants to see if there are any truly good children left, like Charlie.
Sure. The character of Willy Wonka himself is quite a mystery with a potentially dark past. His decision to hold a contest where children could win a tour of his factory might seem like a fun idea on the surface, but it could also be a way for him to interact with the outside world without fully trusting it. He's been hurt before, so this is his guarded way of having some form of connection.
The Oompa - Loompas' situation is more complex than it first appears. They are from a land full of hardships. Wonka takes advantage of their love for cocoa beans to get them to work for him. It's not a completely equal relationship. In terms of the children's punishments, like Augustus Gloop getting stuck in the chocolate pipe. It shows that the factory has its own set of rules that are harsh for those who don't abide by them. And these rules might be a result of Wonka's own insecurities and need for control.