A Ecumenopolis is a world city or a city that is continuous around an entire planet. Since we are only on one planet and it is far from fully urbanized the only ecumenopolises we know of are from fiction. The most popular instance is probably Coruscant from the Star Wars prequel trilogy but many others exist like Trantor and Ravnica. Ecumenopolises present some interesting world building questions like where is the food being grown and were there oceans at one point. The degree to which these questions have answers will depend on the work but given sufficient technological options there are plenty of solutions. Providing that we have cheap enough power production growing plants indoors is more controllable than the outdoors and can be scaled as necessary. To be clear the land area on Earth is 148940000 km2 which is around 67 people per km2 in a population of ten billion. That is positively rural which more or less represents modern Earth. Scaling up one hundred times to a trillion people we get 6,700 people per km2 which is slightly less than a third the density of Paris. This gives a sense for how large earth is and how little of it actually needs to be urbanized even given massive population increases.
Coruscant has a surface area of about 470,665,872 km2 and a population in the trillions. If the population was five trillion that would be around 10,623 people per km2 which would be around half the density of Paris. Keep in mind Paris buildings are mostly under ten stories so the kilometer high towers would be mostly empty. The easiest explanation is probably that the space is being used for growing food but given that Coruscant has been the galactic capital for tens of thousands of years the idea that some or most of its buildings are well maintained ruins isn't actually that far fetched. Moving the population up many orders of magnitude from there gets tricky for heat dissipation reasons but given how the laws of physics are more of a suggestion in space opera who can say if that matters.
The current projections for population growth see us peaking at around ten billion in 2050 assuming present trends hold. If this is the case then it's very unlikely that Earth will even trend in the direction of a ecumenopolis which is probably to the taste of most people. At the same time Paul Ehrlich's population bomb narrative claimed that we be facing full on Malthusian crisis in 2000. Population dynamics are hard to predict and their consequences even more so. Given another five thousand years of human development it would be surprising if none of the planets in our solar system ended up as some kind of urban sprawl. Cool if you are into that sort of thing but hopefully not the only option.
IRON NODER XVII: ALL'S FERROUS IN LOVE AND NODING