Generally LN nodes want the transaction to confirm within n blocks but they don’t want to pay more fees than necessary. Confirming ASAP is generally not needed, unless deadlines are getting close.
But fundamentally, estimators are still estimators and cannot guarantee that transactions confirm before deadlines, especially when directed attacks are in play (pinning, censorship, etc.). In such situations a naive budget-based fee bumping strategy is much more reliable.
Then in this case instead of using the fee function for fee bumping immediately at n-1, you can give it a grace period of say up to int(n/2) + 1 before fee bumping using the output of the new budget based fee function. (More economical)
Towards the end when deadline is really close, you can combine both approaches take the maximum between the output of the fee function and ASAP fee rate estimate to increase the chances. (But when their is a fee spike towards the end of the deadline you might pay above budget using this method).