Those are some interesting points that I hadn't thought about. I have written two full trilogies (still in need of revisions), and I'm currently working on the sequel to the project I'm querying, so this does pertain to me. However, I am going to defend writing the sequels, even if you're not published yet. For one, I write what I'm inspired to write. Generally I won't start writing the sequel straight away, but inevitably I will start getting the "itch", and I know that I need to let this next story out or I will explode. So that's one thing, at least for me, that while I am absolutely writing with the intention of getting published, I also write for me because that is what I need to do. I know neither of my trilogies are in a publishable state yet (although I hope to get there one day), but writing them also gave me invaluable experience to get to where I could write the project I'm querying. So if nothing else, writing sequels before publication is good practice.
Another defense I will offer is that it can often make the first book stronger. I'm one of those authors who has a general idea of where they want the story to go but don't have a strong outline to work with, which means I discover things as I go. So this means there have been times when I figured something out while writing a later book, and because the first book is not published yet, I have been able to go back and adjust the first book accordingly.
The final thing I will say is that while those two trilogies really need to all go together, the book I'm querying and the sequel I'm working on are much more isolated adventures rather than one long story line (think Jim Butcher's Dresden Files versus Lord of the Rings). So I feel that whatever adjustments agents/editors want on this project, there will be less rewrites required for the sequel, which makes it safer to spend time now.
Now, none of this eliminates a lot of the points you made above, namely that if, for instance, you get poor sales, you're seriously doubtful to get published with Big 5 for the sequels (I think that if I ever fell into this position, I would likely go ahead and self-publish the sequels). So ultimately it comes down to a bit of a gamble of what you want to do. For me, I think I'll likely just keep writing sequels, mostly for the first reason I outlined, which is that if I don't write the stories I'm inspired with, my head would probably explode. When it really comes down to it, my number one reason for writing is because that's what I want to do. And there are plenty of legitimate, published authors out there who have written books that they have never published. On his website, Brandon Sanderson will mention some of the books he wrote before he published his first one, which will likely never see the light of day, and I am starting to realize that this might end up being the fate of some of my earlier projects. If that's the case, then so be it, but I don't regret the time I spent writing them, because they are part of how I got to where I am today.
(Sorry, I think I got really ramble-y in this post.)