Do you know the story of the paperclip maximizer? It's a cautionary thought experiment written in 2003.
Oddly enough if you think about it, the story could just as easily refer to capitalism insatiable need for accelerating growth. It is a wealth concentrating ideology. The irresponsible use of AI is killing people but that is to be expected. Every kid AI relieved of life, whether they were driven to it, or living in the wrong place, or starved by job loss, makes the capitalists who sell the AI richer.
The capital maximizer that survives is the one that controls legislation to suppress small businesses that might break it's monopoly. It has found that by putting one group of people under horrifically unbearable conditions, it can worsen the conditions of all others with few complaints so long as they keep the less suppressed workforce convinced that they have it better and may even be superior than the super suppressed (see racism). Destroying the property of others creates demand that it can used to extract more capital from those who have had their property destroyed (see war). Tearing up industrial infrastructure from steel mill to slaughter houses just to prevent small farmers and or any competition from rising in their own backyard and moving manufacturing to places far away allows them to pay people even less (see de-industrialization and the battle for Seattle). Ensuring that there aren't enough jobs to go around so that those who work have to work so hard they only time to think about work and look down on those who can't find work. Any waste of resources is a source of capital for the Capital Maximizer. If the Capital Maximizer doesn't do these things, and the system isn't changed, it will be bought or destroyed by the Capital Maximizer that does. It can't even be called the law of the jungle for that is far more fair and just.
If nothing changes it ends when the population dies out because people no longer have the ability to engage in reproductive labor, due to a lack of resources and sheer energy. At least that's the current theory, as birthrates in capitalist countries have fallen below the replacement rate. Or when wars get too far out of hand and we all die. Automation and AI just allow the Capital Maximizer to keep going a little longer.
The system itself is the capital maximizer, to destroy it without perishing requires a complete dismantling of the system with a new system built to rise in it's place. How we build and support that system will determine if we see what a world without capitalism looks like.