The German apprenticeship model doesn't scale well to less affluent and less homogenous countries (i.e. pretty much the rest of the world) - and it is my impression that German Hauptschule students don't apprentice in professions such as computer programming. Then again, if one accepts the idea that it is o.k. to channel children into career paths at the age of nine or ten and generally reserve the best schools for the upper social classes, then the German model might be as successful as you suggest.
Germany is successful despite the Hauptschulen, not because of it. The apprenticeships are one of the things that allow Germany to get away with its aweful schooling system.