Repayment here means that you eventually need to invest the time to understand the approach used and the code intricacy, to later fix or build upon IF you are to manually/artisanally (for a lack of a better word) go about addressing the issue.
...if you use AI again, then yeah it's a permanent loss.
A debt implies repayment. But the loss here is not going to be repaid, it's permanent
Perhaps a more appropriate term might be "cognitive deficit" or "cognitive loss"