IMHO, not the France was the primary obstacle for unifying Germany in the late XVIII century, but the lack of the national consciousness. The inhabitants of todays Germany felt themselves as Prussians, Bavarians, Hannoverians, Saxonians - not the Germans.
For unification they needed some kind of national idea, which appered in the XIX century after the victories over Denmark, Austria and France.
Nothing fosters a sense of joint national destiny as a good crisis!
I think it's pretty well established that a key year for the rise of German national consciousness is 1812, in order to fight Napoleon.
And for that matter, the German "Länder" are still bickering between themselves in ways suggestive of German national consciousness as a kind of optional-extra they have just grafted on top of a more visceral sense of being Brandenburgers, Saxons, Bavarians, etc.
But you're right that France in the 18th c. was no technical obstacle to German unification. Unless one means it indirectly...
A major obstacle to German 18th c. unification would be the dynastic policies of all these little German statelets. You don't get German unification until a large, wealthy and self-conscious middle-class German bourgeoisie takes up the cause if Germanness in the 19th c. They did so in part as a conscious reaction against the French-oriented German aristocracy and monarchies like Fredrick II The Great of Prussia, reported to have spoken French as his first language, and he spoke crappy French at that, but his German was even worse.
The German bourgeoise set themselves up as the true guardians of Germanness, unlike the aristos who had fallen to pernicious foreign, French, influence. Which is why in 1848 they attempt to unify Germany through a liberal revolution. Had it succeeded there would have been a United States of the Republic of Germany in 1848. But the monarchical reaction crushed it, and the liberal bourgeoise retreated to lick their wounds (except those disgusted enough to emigrate to the US en masse, the "49'ers" iirc).
At this point clever-guy Bismarck recognises that the next time the liberal middleclass decides to rise the flag of rebellion, the odds are good they will be successful in sweeping the crowned heads of Germany from their thrones. So, in order to save these monarchies, the Prussian most of all and the Junker-class of nobles he himself belonged to, this unruly middleclass would have to be given their unification, but if it got done from the top down, chances were it would defuse things to the point where the monarchs and the nobles can go on enjoying most of their privileges.
So that's what Bismarck delivered, to not a small amount of consternation and confusion of the middleclass liberals, who didn't quite know what to make of the situation, even if the unification was gratifying.