All in all, I hope someone or some firms figure out how to break through the hurdle to automation in industries where it would matter like healthcare. It would be the first step to correct the economy in my opinion.
The stock market rises in nominal dollars, which is meaningless, since that is just a result of monetary inflation. Corporate profits, and personal income invested in the stock market will rise with total nominal national income. In economics terms, nominal national income growth is proportional to the growth in the money supply (M*V=Y). So the growth in the stock market is just a result of the growth of the money supply. It has zippo to do with any real thing like productivity. That is why it is always silly when newscasters report the stock market changes every day, and view it as good when it rises, and bad when it falls. They are essentially cheering on monetary dilution. (But inflation always feels good in the short term, so they aren't entirely wrong to cheer it on, it feels good when the stock market rises, even if the same underlying mechanic is also pushing up your milk price).
That said, productivity is not declining. The first derivative of productivity is declining -- that is, productivity is going up, but it's not going up as fast as it used to. Also, the population is going up. And that explains the (real, not nominal) stock market growth.