There's a great infographic that pits human lifespans against this old idea - that investing in the stock market is always a good idea because it goes up in the long run. There were many, many times in the last 100 years where "the long run" was longer than a normal human lifespan.
It's really important not to think of this as just "invest in the stock market." It's "invest in assets with positive expected return." That means you need to diversify across asset classes, and that doesn't mean domestic and foreign stocks.
Also, re: stock market - most people's perception is based on the last 30. That happens to be the longest sustained bull market in history.