Thanks for providing your perspective on this.
In contrast, a friend was doing a more broad topic and after some strong disagreements, was able to switch mid-race.
Another friend was finishing his PhD at a top econ school, and his mother died so he flew back and took a couple of months off. Even though he already had job offers and a completed paper, his advisor (a well known asshole in the field) was so pissed off that he stopped all form of comunication, and my friend had to switch advisors and start a new paper because no one else did that specific topic in the school.
So yes. Luck matters a lot, and YMMV. Your advisor could die, get a nobel prize, or just have a bad day, and it would change things drastically for you.
This sort of thing is exactly the kind of thing that prospective PhD students should ask programs about before signing up, by the way. Don't be afraid to ask lots and lots of questions about things like funding, what qualifying exams are like, what happens to people who don't pass quals, whether anybody's ever changed advisors, what happens if an advisor's funding dries up, etc. etc. As somebody who's interviewed prospective PhD students, I like hearing those kinds of questions, even when I don't have good answers to them- it shows that the prospective student is doing their homework.