Im no islamicist, but my understanding was that the Shiite Fatimids ruled over a population whose muslim component was essentially Sunni. So, 'from the beginning' of islamic rule, iirc.
Of course there were also sizeable numbers of coptic christian.
You are essentially correct. Ismailism in general and its Fatimid version in particular tended to care little if anything about what the masses believed.
However, there was a significant Ismaili Shiite population in Cairo and Alexandria (the scant sources I read don't mention any other Ismaili community worth noting, but maybe there were in some other cities) that was forced to flee or destroyed with bloodshed after the fall of the Fatimids.
The Fatimids themselves never became Sunni, though their adherence to Ismailism became increasingly less militant. However, Egypt has been always majority "Sunni" since the time the word "Sunni" has a meaning.