I’m sure that’s part of it, but Mexico City was built on either an ancient lake bed or an aquifer. As the water is used up, the soil is sinking.
The documentary I watched about Mexico City showed that indeed they are pulling ground water up and the soil is sinking. However, their sewer systems are a mess and over the centuries have sunken or risen in different areas, besides some collapsing, due to sinking soil. This causes huge blockages due to gravity where the sewage can't flow, and it overflows into the streets. Particularly when it rains. They are currently building a new sewer system, but with tens of millions of people they are currently overwhelmed with sewage in Mexico City. The new sewer system is being built further underground where soil sinking won't impact it. For now, Mexico City stinks.