JOQ: "Your taxes" go to the government, not your employer. It's almost certain that a portion of taxes, particularly things like Social Security taxes, end up being invested at least partially in the stock market, but mostly in the bond market.
These days fewer and fewer employers have what are known as "defined benefit pension plans." This was the standard for many, many decades because it was recognized that "most people" will not plan adequately for their own retirement and a portion of the employee's pay, plus (often) some matching funds from the employer, were put away in a professionally managed fund that mixed stocks, bonds, and other investments such that a set monthly amount would be able to be drawn from that fund for a given employee when they retired. Since there was a constant flow of new hires and retirees there was a constant infusion of cash from the currently working that supported the benefits for current recipients. I am actually old enough (and just) to have begun drawing on my defined benefit pension plan from 10 years of employment in the telecommunications industry from the mid-1980s through the mid-1990s.
Defined benefit pension plans met their demise as a common benefit for a number of reasons. They were not adequately regulated, so certain unscrupulous companies that had these raided them to keep themselves afloat when lean times hit, then often bankrupted not only themselves but their employees' pension plan. This resulted in regulations where pension plans had to be completely separate business entities from the companies that establish them. Then there were (and still are) issues where some pension plans were mismanaged and woefully underfunded based on projections of what would need to be withdrawn for benefits. And, finally, but rare, you have situations like the United States Postal Service where, as a reaction to some of the woefully underfunded situations, have been forced by legislation to have to swing completely in the opposite direction and grossly overfund their pension plan based upon any reasonable actuarial projections, which leads to cash flow issues in the present.
Of course, just like the social compact where employers were loyal to their employees and the communities they operated in, and vice versa, has all but vanished companies were more than happy to find ways to kill off the defined benefit pension plan altogether, and one of the biggest ways they did this was with the introduction of the 401K plan. I loved the 401K, and it is what I will be living off of in my "golden years," but I was the very odd 20-something who, having watched people I grew up around who were skilled laborers often suffer in their retirement years because they either didn't, or most often couldn't, put anything aside, socked away the maximum amount I could in my 401K, and always put in at the very minimum the maximum amount on which my then employers would also contribute matching funds. In the go-go 1980s through mid 1990s that was a 50% match up to the maximum amount for matching, which was not insignificant. Who wouldn't want to sock away say, $10K per year when that translated to $15K per year after matching? But, most 20-somethings are not thinking that much past their next paycheck for the next "cool thing" that they want to accquire, let alone to their retirement years, and nothing goes into their 401K, or very little does. Getting started on retirement savings early is about the only thing that allows one to amass enough to actually retire if one is self-funding, and these days almost everyone is back to self-funding their retirement.
Social Security, which is the barest of social safety nets, recognized that "the great unwashed" either cannot or will not have the foresight to put any savings aside for their own retirement. It has been one of the primary drivers in the eradication of abject penury that once was very common among the elderly in the United States. But it is very, very difficult to live on Social Security benefits alone virtually anywhere.
There are very few people who own significant amounts of straight stock and those who do are generally either heirs/heiresses or among the uppermost in the wealth spectrum. The rest of us own stock through mutual funds and/or annuities, which are professionally managed. I would not want to be picking and choosing my own stocks simply because I don't want to have to be watching the markets that closely on a day to day basis and doing all the trading that's necessary to keep a stock portfolio balanced and earning the most it could be. I'd far rather that be in the hands of those who love doing just that, provided they do it well, and let them do the day to day portfolio management for myself and thousands of others. There is strength in numbers/size and the benefit of professional expertise that I will never have myself.