I think the financially smart thing is to avoid debt as much as possible.
Also, if you absolutely need to take on debt and decided to buy a car, the financially smart thing to do would be to buy as cheap a car as possible. But that's not what really is happening, isn't it?
The reality is that taking debt changes how you think and make decisions and has far more reaching consequences than just the financial cost of the debt.
This sort of knee-jerk debt avoidance on principle is not smart.
Second, there exists no index fund that can reliably return 5%. Borrowing money to put it in a financial instrument is called leverage and is a quick way to get poor, not rich (and I know a bit about it because I work with financial risk for a pretty large, well known bank).
Third, the act of taking debt changes how people think. I also know something about it because for large part of my life I had a lot of debt. Wonderful things happened to me after I paid it all.
Too much debt is a bad thing, but so is being excessively debt averse.
I would also say, historically, a dollar now is worth a lot more than a dollar 50 years from now, and your quality of life is probably better, too.
I see lots of people from my parents generation who saved their whole life… and now they have money but nothing to do as their health doesn’t permit the sort of travel (or outdoor activity, or whatever) they wanted while a 20 or 30-something.