Capitalism like serfdom it spawned from will adapt. When automation becomes mOre widespread and large swaths of humans are not needed as beasts of burden to toil their lives away is when the final reckoning will come. Overproduction will always be the worst enemy of capitalism. Capitalisms most basic concept is chattel slavery, work for the system or you have the freedom to starve. One day humanity will look back at this as the barbarism that it is. Granted, it is just another step in the history of humanity. The permenent revolution. Or we could continue to concentrate wealth to the top and the rich will have no need for workers and depopulate. Or we could just nuke ourselves since the elites have the globe rigged to explode to keep their little entitled game going, but this is not in their best interests. Now at least. Thinking about future societies is a good thing, change is inevitable even though many fear it.
We have in no way even started to catch up with our technological Potential as a species, we are still coming out of the dark ages and the Victorian era socially. Wage slavery and Victorian ideas of work will go the way sooner or later like the dominating kings and queens of western society that no one thought would be possible to live without.
Capitalism is like (and very steeped in) religion, like religion we will have to find a replacement and hold a society together without success through accumulation. 19th and 20th century socialism was a baby step, we still have a long way to go before we can be a brotherhood of man though. IMO the rational answer is a fusion of libertarian socialism in a highly automated advanced educated society, but we shall see.