I think Gandalf mentioned something like plan B to Denethor in Minas Tirith in the third book.
He said something like: "Even if I fail, and Gondor falls, I will not totally miss my mission. If anything goes through this darkness that can grow freely and have life in it, I will not completely fail my mission" .. something like that
It would be nice if someone can find this quote.
As I see it, that could be a plan B. Something that Gandalf does not reveal completely (as usually
like he is not revealing his other plans).
I could be wrong, of course.