A very long time. Two reasons why that combine to make things even worse: The cumbersome Mexican government bureaucracy (both Federal and belonging to the Capital district, which due to its size and influence might as well be its own national government) being generally sclerotic to the point of near uselessness for anything requiring long-term, planning-driven effort that doesn't just benefit a certain coterie, and the fact that much of Mexico City has been built over the literally, purposely buried ruins of the ancient Aztec capital, making underground digging an even bigger legal nightmare if archaeological remnants are discovered and said discovery made public. (applies mainly to the central part of the city).
Live here by the way, since nearly 2 decades ago, so lots of experience with the bureaucracy aspect and the general workings of government.
Pipe retrofitting in San Francisco took years, along its main street Van Ness.
How long would this take in Mexico?