A very important nuance (not disagreeing with you, just sharing my pet thing), is that the stock market outgrows GDP because you aren't investing in the economy as a whole. You are investing in the good parts of the economy that people are excited about (i.e. When you invest in Amazon, you assume that they will continue to take share from mom and pop retailers, even in a flat-GDP scenario). You are also generally assuming that US-HQ companies will gain share globally, not just in the US.
That's why the Internet has been so positively impactful to the S&P 500 - it has really accelerated share shift to large companies (even if it hasn't accelerated GDP) and it has increased the global share of US-based companies.