Actually the reason they missed every shot when they were shooting at the main characters in the Death Star is because they were explicitly told not to hit the main characters in the Death Star, as Leia immediately points out when they escape the Death Star without immediately being shot down by like a million space fighters. Which we later see verified when the Empire follows them from the Death Star to Yavin IV with a tracking device
And don't even bring up the ewoks. Remember that time the US lost the Vietnam war? Sometimes vastly superior technology and training isn't a match for home turf advantage. If you're gonna criticize the Empire for their tactical blunder there, criticize them for not bringing a Star Destroyer and destroying the whole forest from orbit.
The US won every major engagement in Vietnam though,and usually by fairly significant margins too. For the analogy to work, the Empire should have massacred the ewoks, only for Palpatine to get voted out and the new emperor to withdraw.
Those were standard military engagements, as in two armies facing off against each other with clear strategic goals. The US had the greatest military force in the world at the time, so obviously they would win in a straight up fight. Where the US military struggled was with insurgency, and they struggled with it again in Afghanistan. When the force you are fighting is able to disappear into the forest, a lot of your advantages get neutralized. You can't drive your tanks through the forest, for example. The ewoks obviously don't work as a 1 to 1 comparison, but fit pretty well with popular perception of the Vietnam war.