The good news is that population growth tends to slow or even come to a halt as countries get more developed. In places of high education and per capita wealth, the birth rates are significantly lower.
Birth rate - Wikipedia, the free encyclopedia
Total fertility rate - Wikipedia, the free encyclopedia
In some places, population growth has stalled or reversed. Many other places might have the same effect if they get to this point.
If each couple has on average 2 children, then the population should steadily decline, since not everyone mates and has children, and not every child lives to an age to reproduce. So it's like for every person, they get replaced by 0.95 people or something (with the precise number being unknown to me).
The bad news is that as far as I understand it, the way that the wealthy nations live is not sustainable. We're messing up the atmosphere, the oceans, the soil, putting things all over the place that don't degrade within our life time, cutting down ancient forests, reducing biodiversity, and so forth. So it's not like all of Africa and Asia can get to the same level of resource consumption and pollution as Europe or other developed areas, and let the population fall from there. I think we would break long before then.
So it's got to be a combination of living far more sustainably (renewable energy, little or no pollution, stable resource consumption that is balanced with regrowth, a change in diet, etc.) and a reduction in the birth rates of the most reproducing countries (increased birth control, increased education, decreased poverty, etc).