There was a plan per se, but Ramsay is a master manipulator, with a huge army... No matter what they did it would be seen as a last stand. It was basically a rescue mission that blew up in Jon's face. Stannis was a great commander and was shredded by Ramsay.
If you want to get down to it, Ramsay was a worse commander. He left the advantage of Winterfell, a fortress that was built to withstand a siege of ten thousand with just 200 men, to fight in the open. The only chance Jon had was getting Ramsay to fight him in the open and he did.