I think that paradoxically, you need the Ottoman Empire to be a part of early industrialization to get the Greeks demographically capable of making Constantinople a megacity.
Rough sketch here, but let's imagine a scenario where the Dutch, English, or Spanish Netherlander merchants set up ambitious trade routes to Constantinople after a political detente or formal alliance is reached between the Sublime Porte and England/The Netherlands/Spain(somehow) in the early 18th century. With Greeks acting as middlemen, the Ottoman economy is exposed to North Sea trade goods earlier versus OTL where Ottoman trade was mostly domestic bar a few key cash exports and thus, Greeks get greater exposure to the beginnings of both early industry and the printing press. While most trade is managed by North Sea traders, a handful of Greeks establish a Greek quarter in London/Amsterdam/Brussels/chosen ally's major trade hub that serves as a node through which the Ottoman Empire's Greeks and the whole of the old Eastern Roman Empire are exposed to modernity, one of the biggest being the widespread literacy compared to their native Greece.
Knowledge, as well as the smell of opportunity, diffuses back into the Aegean via these traders, and prominent Greeks in the Ottoman administration as well as sympathetic recent converts of high standing convince the Sultan to permit the Greeks to introduce the printing press to Salonika so long as they print only in Greek. While known to the people of the region, the printing press never truly took off during its initial introduction, arguably in part due to the sorry state of the Hellenic peoples during the late 15th century as well as the heavy discouragement by Ottoman authorities.
Simultaneously, early attempts at primitive factories begin in Salonika and Constantinople by ambitious Greek merchants seeking to capitalize on abundant Ottoman produce such as cotton from Egypt and wool from Anatolia. While the latter aren't particularly successful at first, the printing press is a major hit with the Hellenosphere and soon, Greek books are circulating throughout the Eastern Mediterranean and a push for literacy occurs in the Greek Orthodox Church. The texts are largely religious or deal with Greek mythology at first, but this rallies both the church and those disenfranchised by the Ottomans to read their own history with their own eyes. Languages such as Arabic and Turkish are prohibited at this time from printing by Muslim authorities, and Slavic languages and Romanian largely removed from the movement due to their more isolated geography and less standardized dialects. This literary boom in the Eastern Mediterranean carried on the backs of Greek traders leads to a revitalization of Greek communities along the Aegean and Black Sea coasts, particularly historic ones such as the Alexandrian Greeks.
Time passes and amidst Ottoman political instability, Greek-owned factories have slowly started to spread following in the footsteps of the English along Greek-heavy cities in the Attic peninsula and parts of Anatolia, as well as Alexandria. And akin to early industrialization IOTL, this leads to this economic Hellenosphere mirroring the same trends as in Western Europe; urbanization, population booms, and political instability. Long story short, due to the Greek economic domination of most Ottoman cities along the coasts leads to the gradual Hellenification of Christian immigrants to urban centers as they're by far the early leaders in education as literacy becomes more and more important to sustain this economic model. Identifying as a Bulgarian while speaking primarily Greek becomes commonplace. The Ottomans are suffering from most of their OTL political instability but the wealth of the Greek community has them serving as a crutch; Greeks are largely left alone so as to maintain their most reliable source of taxes. Meanwhile, the demographic boom really only hits the Greek community due to the nature of Ottoman industrialization, and only later reaches other parts of the OE during the later stages of industrialization(1870s onwards).
End result, you have a much larger Greek population much less inclined to emigrate away from Greece due to the greater prosperity of the region, as well as also making up a greater demographic share in most OTL territories where Greeks made up majorities or significant minorities. No matter the route you choose, you have the demographics that even in a population exchange scenario, there are plenty more Greeks with which to play around with for this scenario. If you want the best-case, IMO you get a successful Greek Plan built atop of this scenario that manages to get backing from a significant naval power(Britain, France, Spain) and thanks to the greater bourgeoise class in Greece, has both financial and popular support. Thanks to this the Ottomans suffer crushing defeats at sea and are effectively split in two with the Greeks getting the full lands outlined in the Greek Plan as well as encouraging a Mamluke revolt in Egypt, leaving a rump Ottoman Empire in Anatolia and the Middle East.
This'd give the Greeks more time before industrialization gets truly swinging to prepare their capital, Constantinople, to truly boom during this period. Bulgaria can be (potentially) Hellenified in part via socioeconomic pressures and a heavy focus on Hellenfication, Greek outlying islands can be seized from Venice, and Greek refugees from Anatolia settled in Greek Bulgaria to reinforce Hellenfication. With a more prosperous and stable state, less Greek emigration should also occur. And to top it off, Greece should follow in the footsteps of Europe's demographic transition resulting in very high population growth. Final product, Greece with a much heftier demographic presence(30 million? 40 million?) with a megacity comparable to OTL's Istanbul(maybe).