1. Napoleon ignored Ukraine when he invaded Russia.
2. In WW1 the Germans never fought for Ukraine. Ukraine was on the front of Germany's Austro-Hungarian allies, and they retreated more than they advanced. At the time of the treaty of Brest-Litovsk (March 1918) Ukraine was already in full rebellion against the Soviet government in Moscow, so the Bolsheviks simply ceded all Ukraine to the Germans.
3. In WW2 General Guderian considered it a terrible mistake for the German army to temporarily turn away from Moscow in the summer of 1941 in order to assault Kiev. His warning was prophetic. Ukraine was not a buffer but rather a diversion; it is not on the road to Moscow.