MZ didn't actually have majority control through every funding round. They key is that other investors (e.g. Sean Parker, Accel Partners, etc) gave voting control of their shares to MZ.[0]
So the ingredients to maintain control (or eventually consolidate majority control) is to have leverage in some way. Multiple forms of leverage:
+ startup has real revenue and is cash flow positive and thus is not desperate for VC funding: Microsoft profits in 1981 would be an example. They didn't actually need David Marquardt's VC money before their IPO in 1986.
+ startup has exponential growth: Facebook is an example. Facebook was so popular that Accel Partners sought out MZ and not the other way around.
+ demonstrate amazing management skill: Jeff Bezos would be an example. He doesn't have majority voting power via dual-class share structure. Instead, other investors let JB control their votes. Even his ex-wife who he cheated on recognizes that her Amazon shares she got in the divorce settlement would be worth less if someone else besides her ex-husband ran Amazon. So she signed over her voting rights to him.
Another thing that worked out for MZ was the older Sean Parker acting as a defacto "consigliere" to warn him how VCs strip power away from founders. And as noted earlier, when Sean was kicked out of Facebook, he turned over his voting rights to MZ.