If you invest in a broad market equity index fund like VOO, then you will keep up with inflation. All the inflation has to be reflected in the country’s business’s bottom lines, so it would also be reflected in their share prices.
He included inflation, and there's plenty of tax advantaged accounts that let you grow tax free