I think the stock market is fine. It allows the people to own a bit of the companies they work for and buy from.
I don’t see anything wrong with that in theory.
It’s a critical element of the financialization of the economy that has lead to it becoming even more irrational and unstable than it was before. Easy example, look up stock buybacks. It’s not just that though, it’s the entire system of obligation to shareholders to deliver quarterly gains with no concern for employees or even the long-term health of the company.