The stock market is going to exist and do its stock market thing whether we individually participate in it or not. If you have a bank account, your bank already invests your money in the stock market, they make a 10% return on it while they give you 1% as "interest". So no there's nothing bad about participation, in fact I'd rather communists take their finances seriously and use the surplus to invest in the party or something.
In the other hand we know material conditions are the drivers of change and the drivers of ideas changing, and of course someone who starts making money will see their ideas change.
The way the stock market works though is for rich people to get richer and find property to possess. This is how it came to exist in the first place. When warren Buffett puts 10 million dollars in the stock market, and he makes 600k at the end of the year from it, that's more than most people make in 10 years.
But if you invest 10000 dollars and only make 600 at the end of the year, that's barely enough to cover rent. Its welcome income if you are not using the 10k, but its not a wage.
This is how the game is rigged, plus all the other plans and funds rich people are allowed to invest in that are not open to us. They pay 0 taxes because they report 0 income because they live on loans that put their stock as collateral. Loans are expenses, not income, so they avoid paying taxes. We're not gonna beat the bourgeoisie at their own game.