A lot of people are invested in the stock market, not just rich people. Essentially anyone with a professional-class job has a retirement fund invested in stocks, at least in the US.
The top 1% own over 50% of equity in the country. The following 9% own about 30% of equity. All in all, that's the top 10% owning more than 80% of the equity in the country.
I disagree that a lot of people are invested in the stock market. Statistically, it's very few people.