Who says that the loan with the shortest term also has the lowest interest rate. The 10-year term is 0.02% worse than the 20-year fixed rate. However, I can make as many prepayments as I want monthly, i.e. if I have 2,000€ left at the end of a month, I make a prepayment. If the next month I receive my profit share and my bonus, I make a prepayment, and so on, immediately.
The goal is to have the medium loan paid off after 5-6 years so that the monthly burden decreases.
But doesn't the loan with the shortest fixed interest period have the lowest interest rate, and shouldn't you pay off the highest where the interest rate is highest? And after 10 years you can make as many "prepayments" (cancellations) as you want anyway. In this respect, constructions with several regular annuity loans of different terms never make sense to me.
To the initial question:
I would formulate a rule: The fixed interest period should always be somewhat shorter than the calculated term. You can manage the final end with the then "low" remaining debt, even with a significantly higher interest rate. I would always take this bet.