Welcome! Here are some tips for using this forum.
I remember a heat pump setback stat that was supposed to learn how long it took to get back to the set point from its setback and start its ramp up in time to do it all without calling in the second stage. It was called something like "intelligent recovery". If its still out there it might do the trick for you.