Returns from stock investing come from increasing stock prices.
Stock prices increase when earnings of the company grow.
In other words: when the economy grows.
You can argue that Amazon and Apple and Google and Facebook etc. will grow earnings even if the overall economy is flat or shrinks but I don't see how that would apply to passive investing i.e. investing in S&P 500 i.e. investing in 500 largest US companies.
S&P 500 is U.S. economy and they all are sensitive to overall economic situation. If people have less money, they buy less stuff. Amazon makes less money, their stock goes down. Apple sells less iPhones, their stock goes down. All other companies make less money, they spend less on advertising, Google and Facebook make less money.
I don't see a scenario where overall U.S. (or world) economy declines and S&P 500 doesn't decline.
In fact, declining economy is an argument for active investing. Even when overall economy declines, among 6000 companies listed on stock market there will be some that will be growing and if you invest in them, you'll make money.