Build a relationship
Take the time to get to know your contractor early in the process even if it's just making small talk about their families or favorite types of projects. First, it will just make the experience more pleasant overall. Second, even the most irresponsible or unprofessional people are less likely to "ghost" someone with whom they have a genuine rapport.
Also, when you do have a problem, approach them with respect rather than penalizing them for your own past bad experiences. Most contractors, including the difficult ones, are not intending to be so; in fact, they are likely to be under a great deal of stress themselves trying to juggle other projects. A little understanding on your part can go a long way.
Start with a preconstruction agreement
Don't jump right into construction. Many contractors spend a lot of time estimating larger, high-end projects and cannot afford to do this for free. A pre construction agreement is a simple 1 to 2‑page agreement to pay for their time to estimate and schedule the project.
If they can't do that well, then chances are they can't execute the project well once construction starts. This limits your liability and protects you in the end. Plus you own the work they do, so if they don't work out you have all the documentation when looking for the right contractor. This helps to really build a strong working relationship.