Yes, if you take on the debt
after the inflation it does you no good.
But if you take loans in 2015 dollars and repay them in 2022 dollars, you are better off in terms of repayment by having a lot of inflation during that period. It doesn't matter what purpose you took the loan for.