Margaret MacMillan argued that the basic problem with WWI was that Germany never actually lost, they fought to a stalemate and started negotiating before things in Germany could get dicey. As a consequence Germany never truly assumed the mantle of the defeated, merely of the temporarily set-back. She further argued that neither England nor France had the materiel to pursue a war with Germany to its logical conclusion and the Germans knew it; whether or not the United States could have funded such a war is an open question but the facts on the ground argued against it.
if Germany had lost, the "negotiations" over reparations would never have been negotiations, the Germans would never have tried to wheedle their way out of it, the Allies wouldn't have built their banking systems on the assumptions that German war reparations would subsidize them and the Great Depression and WWII would never have been fought. Effectively, she argued that WWII was actually "WWI Part II" and was only possible because all involved economies spent 30 years building up for it.
I haven't read much about Napoleon but it seems that he probably made the same mistake of trying to take Russia, which extended his lines way longer than they could sustain.
The problem with wars of conquest is they eventually become wars of control which are very different wars indeed. Both the troops on the ground and the people supporting them back home have very different expectations for their daily lives and their futures under a war of conquest - they'll put up with a bunch of shit on the idea that it is short-term, is temporary and will lead to better things. As soon as you say "France is now Germany we're done" everyone in Germany expects their payback. So you keep fighting.
Neither Napoleon nor Hitler had any gift for managing a populace not perpetually engaged in existential war. As a consequence, they needed to find existential war wherever they could. At some point you're surrounded by oceans, mountains, deserts and Russia.