The concept of an ever-growing economy only came into existence with industrial capitalism, and as that system exhausts itself and runs out of resources, we will simply revert to older, agricultural economic models of social organization.
Capitalism is like evolution. A great survival of the fittest mechanism by which a local optimum is slowly approached, but fundamentally less-than optimum structure. It allows unorganized societies to improve and survive (but not thrive).
As the oil runs out, it will start to look a lot like the middle ages - except semiconductor technology and jet engines will remain, and some oil will always be accessible, for some people.
If the food trucks stop running into a major city for longer than a week, then impermanence of our current form of social organization would become extremely stark. There's only so much oil, and climate change will slowly and inexorably overwhelm our ability to protect the mega-industrial infrastructure upon which our modern civilization relies.
Central economic planning (which, contrary to cold war rhetoric, can be at least as democratic as our current society) is just as important for the long-term survival of the human race as genetic engineering.
How could we design an economic system that could cope with a potential population stagnation or decrease?
It's called, sustainability. In the past, agricultural societies existed 'stagnantly' for thousands of years, and we can do so again if we can bring our resource usage within environmentally sustainable levels.
The population can't grow infinitely, which means the global markets must stop growing, or even start shrinking at some point. Unless technology stays one step ahead. Also, when there are less young people working, than old people to be fed, the pension systems will fail.
Supply and demand can be semi-independent of effects of population change. Pension system can be dealt in many ways. But the end result will always be heavier taxation or heavier burden on the employer/coporation.
It's natural that mankind would depopulate naturally, but the governments are running scared not wanting to be the first to let it go natural, hence this shitfest of immigration everywhere.
Because we wouldn't regress back to tribal villages or anything. No, the average person is intelligent and rational and a long-term planner and will continue to work for the good of society as a whole.
A world government runs everything. It allocates everybody their job and supplies them with a certain amount of credit for their work. It also sets the cost (in credits) for all goods. Credit is created in wage payment and destroyed when exchanged for goods. Every problem with our shitty free-market economy vanishes overnight.
One day we'll cure aging and disease. Every person will be eligible for the cure at age 21-30. You then live in your prime for 80 years. Once you reach 80, a genetically pre-programmed switch will be activated causing you to die painlessly. In addition to the genetic death switch, you will also be limited to two children, a boy and a girl. The first child can be either sex, the sex of the second child will be determined in utero and if the sex is the same as the first child it will be aborted. After your second child you will be sterilized.
Just leave everything as it is and let the markets deal with it. The hive mind is our only hope. Get rid of the government. Every bubble is the result of the government forcing people at gunpoint to support and unsustainable system. You don't need force for people to choose what is best for themselves.