Having debt is not the worst thing in an inflationary period. The inflation reduces the value of your debt.
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.