When in doubt, timebox it.
When you’re at a development crossroads — you have something working, but there’s a ‘better’ way that you want to try — and on a tight deadline, set a short, FIXED amount of time to try your alternative. If you can’t get it working, scrap it. And be strict with your ‘timebox’.