We will probably avoid it the hard way. A global organisation efficient enough to support an artificial ecology the world over is almost certainly beyond our reach: long before we got close, the system would have broken down into local squabbles over resources and the excess population would be removed the old fashioned way by the Four Horsemen.
I feel increasingly conflicted when I hear appeals for famine relief (or indeed any kind of disaster relief.) When some journo explains that without help X thousand mothers and children will die, my instincts cry out, but my logic says, a good thing too. Gaia is doing for us what we don't have the guts to do ourselves.
Barring some impracticable world dictatorship powerful enough to impose a Chinese birth control regime on the whole planet, Nature will bring our numbers down to what the planet can carry by the same thing that stops any runaway population, a mass die-off. The only question is how badly we will have damaged the ecology before it happens, which will affect how small the surviving stable population is.