If the goal is to continue to survive as a species, there are much more effective strategies to implement.
Suburban living on average doubles the climate impact of the same number of people in a city. The OP notes correctly that this externality is not correctly priced in the current market.
You also haven't considered that as you move people into cities you need to scale up infrastructure in the city itself. Living spaces, transportation around the city, supply lines for supermarkets. Everything needs to scale. It's not black and white that moving everyone into a tightly packed city is going to make a meaningful difference to global emissions.
What would make a tremendous difference is turning the entire grid into a green smart grid powered by solar, wind, geothermal, etc. That would change things regardless of where people live, because the sources of energy are decentralized and can exist basically anywhere that natural resources like solar and wind exist.
Carbon emissions are directly correlated.
> You also haven't considered that as you move people into cities you need to scale up infrastructure in the city itself.
Infrastructure has economies of scale, so environmental costs scale sublinearly with capacity.
The common answer is to not calculate it but to add a carbon tax. If you make gas more expensive, road taxes higher and non-renewable energy higher cost, the market actors will change their behavior.
As for the infrastructure cost, you pay that in either case and it’s more efficiently built the denser things are.