We either have to learn to have a society that doesn't depend on ponzi-scheme style constant population growth or we just keep pursuing unfettered growth that [increasingly less slowly] destroys the ecosystems we ultimately depend on for survival, to say nothing of natural beauty.
I guess space colonization is a third variable here, but the feedback loop on that is likely to not materially affect our trajectory in either direction.
the problem is that we seem to have sleepwalked into depopulation. we had decades to plan ahead and automate our means of production and distribution but chose to keep the same economic system based on infinite growth going.
it's possible that a lot of the loss in working age people won't be that bad - "bullshit jobs" (Taleb) do make up a lot of the existing jobs, so perhaps it's only the economic system that needs to change and the underlying population and means of production will be enough to work with.
I guess space colonization is a third variable here, but the feedback loop on that is likely to not materially affect our trajectory in either direction.