You are both correct that the term “Yankee” had been around for a while. However, the connotation of “yanking” and the pairing with “doodle” (which you correctly pointed out was already on the endless list of synonymns for the male member) was what made it stick with British soldiers in 1776.
...Wasn't why Hurons and others were using the word in the 1750's, during the French and Indian War, if James Fenimore Cooper is correct in his dialogue usage. Magua uses the word "Yan-Kee" a couple of times (see the Daniel Day Lewis remake with Wes Studi as Magua, for the pronunciation).