Sort of...
For example, I already know very precisely today that in about 8 years I will have €20,000 available and that the entire loan will be paid off 6-7 years later with a painless monthly burden of €150 - or faster if I want to.
With a comparable stock savings plan, it's a different story. If I definitely needed the money in 8 years, things could look bleak here. That's why I don't want to increase my stock allocation and at the same time want planning certainty - here almost down to the cent.
For long-term retirement provision, nothing works without stocks, of course.
Best regards