Best way to avoid delays is making the best effort to analyze the project timeline in detail and continuously estimating it based on progress and changes. And in the process keeping all stake holders in loop to either decrease scope, increase timeline or resources. If stake holders are continuously informed, they feel part of the process and are generally ok with small slippages in timelines or are willing to reduce scope rather than getting surprised near the delivery time.
I tend to spend significant time in project planning in the jira by assigning points to stories and creating dependencies between stories correctly and then working with team in joint planning session to map stories to sprints and ensuring points are assigned correctly to stroies. And then staying on top of the plan with team and stake holders so as to avoid surprises. If you inform a stake holder of a delay several months ahead than near the end the stake holder can help reduce scope or adjust priorities. Otherwise, if communication on time slippage is delayed it creates distrust and frustration.