What you're describing in your example actually would be considered zero sum if true. Thats why you have to look at it from the lifetime of the investment. Because that bagholder Alice when the shares fall to zero, would have lost $13 worth. So it all sums to zero over the lifetime of the investment.The equity market is not a zero-sum game.
You buy a stock at $10 and sell it to John at $11. You made a profit.
John sells it to Paul at $12. John made a profit.
Paul sells it to Alice at $13, and so forth... Paul made a profit.
Of course only the last unfortunate buyer is left with the "hot potato" and will experience a loss when the music stops.
For some non-dividend paying stocks that go up and then go bust, you can say its zero sum. But actually even that is more complicated than that because of the complex flow of money during the IPO process where there can be net losers and actually negative sum, if one were to look at the trades themselves, since angel investors and founders acquire a lot of shares equivalent to being really cheap.
But actually, the argument for stocks not being zero sum is because of redistribution of money from the corporation to its shareholders. Corporations live and breed in the economy and they make a lot of profit. So they are sucking as much money as they can from the economy. This money is then funnelled and distributed to the shareholders via dividends and buybacks. So actually, just looking at the stock market, these stocks actually can have net positive gain. Simply because they are just a money supply aggregator and distributor. But from the entire economy's perspective, everything is zero sum. One's loss is another one's gain and everything adds to zero. Of course, over time central banks print more money to keep the public float of money supply constant, but otherwise the economy at any snapshot is zero sum. Stock market being an aggregator of capital and distributor to shareholders, on its own, is often non zero sum.
We have of course ignored all the frictional contributors, such as all the middle man in every transaction (like brokers and market makers) that bleeds away some money from the market. But provided there is net inflow of new investment capital, and companies continue to survive and distribute a high portion of money back to shareholders, the stock market is not zero sum.