To think the plan was thought of before Twilight got to even start.

That was the best part—Spike deliberately sabotaged Rarity's plan, and then persuaded Twilight to go ahead with her original one, leading her and the rest of the Mane Six right into the trap. The little guy's far more devious than we give him credit for.