Capitalism can be ended by leveraging automation in such a way that it undermines the profitability of capitalist enterprises. This can be done by gradually automating key industries like agriculture, manufacturing and service reducing the need for human labor and thus the supply of labor that drives down wages, no human labor, no wages and without wages there is no commerce and without commerce there is no profit.
As the profitability of capitalist enterprises is reduced, they will become less attractive to investors and less able to dominate the economy. Over time, this will lead to the decline of capitalism and the rise of alternative economic models, automation will also lead a more equitable distribution of resources and a more sustainable economy.
Seize the means of automation.