This is such a bad advice. Buying an index is what they want you to do. They want you to buy and hold until you retire. Do you not see the problem with that logic?
Stocks are the middle class's ticket into the ownership class.
Buying an index fund full of stocks at their current market price is no more illogical than running code you didn't write yourself. It's way way less work, it probably works better.
Better yet, trusting someone else's market price is much easier than trusting someone else's code because of the thousands of black-hat investors searching for profitable vulnerabilities in the market prices.