Assuming that higher density is always better ignores the externalities required to maintain such a system. Higher density cities require more outside inputs brought in from outside the city. Those inputs strip resources from other lands, require input to process the raw materials, and require fuel and vehicles to transport the goods into the city frequently. The city's waste must be transported and processed somewhere, again adding impacts to the environment even if those impacts aren't directly felt within city limits.
If the goal is to minimize impact, cities would only be as large and as dense as they can reasonably be self sufficient. That doesn't preclude trade between cities, states, and countries, but it does mean the city isn't entirely dependent on a constant churn of bringing in resources from elsewhere and shipping out waste.