1. Is it a good ending for Charlie to take in the factory or not?
2. If you are the writer, how will you end the story?
3. What is the purpose of this ending? How does it relate to the purpose of the whole book?
Madness is something complicated. It's hard to judge whether it is right or wrong. Eating people to follow the religion is mad for us. Being extremely enthusiastic soaking into science even sacrificing their chance to pursue material pleasure to follow science seems crazy for us, too. But I think the madness here refers to the differences between Mr. Wonka and normal people. For instance, Mr. Wonka acts like a child seems crazy, and it is very immature. But maybe the reason why he always creats fun things is that he never get bored to learn, just as curious as a child. So, maybe madness is the result of chasing some personalityies or characters and over-devoting oneself into something beloved. It's hard to judge whether it is positive, because people have different perspectives and dreams. Maybe the people that seem crazy just have a different dream as you have. Maybe they just sacrifice the calmness to run for their different targets. To sum up, whether madness is positive is just like Schrodinger's cat theory, I never know.