Ughhh I wrote out this eloquent answer and then I ERASED it and probably I can’t recreate it so sorry in advance. Annnnd I don’t think you’re going to love my answer anyway, so double sorry in advance?
Basically, I don’t think the plan laid out in your ask is an awesome one.
Before anyone jumps down my throat, let me say, I have no problem with the world of self-publishing/indie-publishing/e-book-non-trad-publishing, or whatever you want to call it. It’s a totally valid path, and it’s great to live in a time when authors have more choices than ever.
For some, in fact, it’s not just “a valid path” — but the BEST path. Some books THRIVE as e-only books, and do much better that way than they would in the traditional bricks-and-mortar hardback-paperback world. Some authors have GREAT rapport with their audiences, and can do tremendous things without the help of a publisher, and really WANT to be in charge of everything. For these books, and for these authors, self-pubbing is probably always going to be better than trad-publishing, particularly now that it is so easy and relatively inexpensive to do well.
In my opinion, if you are going to choose self-pubbing, you need to go all in. That is to say, pay for editorial, get a great cover, spend time and energy on a marketing plan, devote yourself to doing it WELL. If you don’t, you are likely not going to be great at it. Sorry, real talk. There are probably a few people who threw up unedited p.o.s. first drafts and made a bajillion dollars out of nowhere, but they are few and far between. This shouldn’t be something you do as a fallback for if you fail to get an agent - it should be something you actively decide to do and to succeed at.
Particularly because your reasoning (that you’d get an agent interested after the fact) - is really flawed. To turn an agent from “no” to “yes” on a book they’ve already declined, you’d have to sell MANY TENS OF THOUSANDS of copies. In other words, your book would have to be a major hit. And if it were selling THAT well, you’d probably be making more money than you would have at traditional publishing anyway, soooo… why not just get an agent for the next thing, if you still really want one?
There’s … well. There’s something else, too. The elephant in the tumblr. And here’s the part you REALLY aren’t going to like:
Lots of people DON’T get their first book published, or even their first couple of books. Writing books is something you can only really learn by writing books, after all, and it takes time and practice to get super-great at it. Maybe if you’ve really queried all the agents there are to query, and nobody has taken the bait… maybe, just maybe, your book isn’t good enough yet.
If I were you, and I was set on the traditional publishing path, I’d consider getting a great crit group (preferably with some experienced, traditionally published authors in it) — and really working on craft. Query, but also write another book while you’re querying. Keep writing, keep going, keep improving.
If you get a bunch of rejections of your work, and a lot of them are saying the same sorts of things, REVISE and query more. If you aren’t getting bites on your query at all, your query itself might be the problem, so consider getting that critiqued (the forums at Absolute Write, for example will do a query crit for you that might be useful.)
If at some point you decide to self-publish, great, that’s fine, just make it a conscious choice you are doing for its own sake, not as a “sneaky” way to get agent or publisher attention.
Then if you DO happen to get that attention, great, bonus … but you won’t be disappointed if you don’t. And yay, you’ll have more, even better, projects in the pipeline!