A bit simple minded.
Capitalism is a system with several distinct components. Investment is a process whereby wealth is accumulated and used to develop mines, factories and the like which in turn create more wealth. Finance is the operation of banks and other institutions to move money from place to place. Markets are places, real or virtual, where goods are traded or exchanged for money. Markets, mines, factories and banks all existed long before Adam Smith developed his theories about them.
Over the last couple of centuries we have (at least in theory) had a system called Free Market Capitalism. A market system may be considered free when it is not unduly controlled by governments or monopolies. We have also been rather keen on Free Enterprise, which means mines, factories and so on are privately owned and operated in a manner reasonably free of government interference. We do, however expect a system of laws governing contracts to enforce repayment of loans and delivery of goods that have been sold. There may even be laws holding mine and factory owners liable when they kill or poison their workers, although there are certainly those who regard this as undesirable interference.
Too Big to Fail generally means we're in a situation where owners no longer suffer the consequences of failure as they are assumed to do in Free Market Capitalism. We the people didn't get a voice in how they were run, but we're supposed to bail them out.
The stock market is the interface between Finance and Investment. It is indeed part of the capitalist system as we know it. If you buy shares in a limited liability company, you're putting your money at risk, hoping the operations of the company will be profitable. However, if you're just looking for a quick return in the short term, you probably don't care if the company is successful in the long term. You may pressure the directors to go for short-term profits to drive the share price up so you can sell your shares at a profit, leaving someone else holding shares that will lose their value when the short-sighted decisions lead to problems.
The stock market is not necessarily good for the long term health of the economy.
If companies are owned by people who have their own money invested, they will probably be managed for a balance of short and long term returns. If companies are run by managers who are trying to attract the interest of day-traders, then main street may very well suffer.
Capitalism requires companies to be able to raise money through investment in shares, but there's no guarantee that stock markets will operate in a way that leads to a healthy capitalist economy.