At the end of Willy Wonka and the Chocolate Factory (the 1970 version with Gene Wilder)*, Wonka explains that his plan all along was to turn his factory over to a child.
Wonka: So, who can I trust to run the factory when I leave and take care of the Oompa Loompas for me? Not a grown-up. A grown-up would want to do everything his own way, not mine. That's why I decided a long time ago that I had to find a child. A very honest, loving child to whom I can tell all my most precious candy-making secrets.
Charlie: And that's why you sent out the Golden Tickets!
Wonka: That's right. So the factory's yours Charlie, you can move in immediately!
How could he have possibly known that all the Golden Tickets would wind up in the hands of children? After all, a grown-up could just have easily have bought the winning chocolate bar; there was even a hoax earlier in the film where the fifth Golden Ticket did go to a grown-up. And yet against the odds, five children got all five Golden Tickets. How could he have counted on getting this result?
* This might have been a plot point in the 2005 version too, but I don't have it handy.