This depends on at least four premises:
a) that your wages at least track with inflation
b) that your expenses (not debt) track less than inflation
c) that you can buy into stocks/bonds before the inflation AND they track at least with inflation
If any of those are untrue, your conclusion falls apart.
If all three are untrue, your expenses are growing faster than your wages and the little you have left over is now buying already-inflated assets.. which we've seen play out once in recent times.