I buy this, for the most part. There are really only two major instances of the Stormtroopers looking like boobs, in the entire Original Trilogy: when our heroes are fleeing the Death Star (and after Tarkin has signed off on Vader's plot to let them escape so they can be tracked to the Rebel base...which is really kind of shitty news if you're one of the four TIE Fighter pilots sent to not blow up the Millennium Falcon), and when our same heroes are fleeing Cloud City.
In the latter case, there's only one egregiously bad instance of "Holy shit, you stormtroopers suck!", in a very brief shot where the heroes dash across a wide room and one Stormtrooper comes along behind them and, despite his clear line of sight and lack of obstruction, misses with both shots he takes. Chewbacca turns around and with one shot puts this guy down. So yeah, that dude sucked. But for the rest of the time, the Stormtroopers don't really have good shots on the heroes, and R2 puts up his smokescreen, so there's that.
As for the Ewoks, this shows a nice pattern to the Imperials' thought processes which bites them in the arse again. Remember in the first movie, during the briefing, General Dodonna points out that the Death Star's defenses are designed against a large-scale assault, like a fleet of battleships. The Death Star is designed to go up against a bunch of Star Destroyers, and it never occurs to the Empire that anyone's going to attack with a bunch of tiny fighters. Likewise, it never occurs to them that the primitive natives of Endor pose any threat at all, and in reality, they probably don't. It takes Ewok numbers plus some technologically-savvy Rebels (led, in this case, by an improvising smuggler by trade) to manage to get control of things. And also, remember that the Rebel mission on Endor is not complete defeat of the entire Imperial apparatus there; they're just looking to get in, blow up the shield generator, and get out. If they manage to do that and still leave a thousand Imperial troops alive, then they've still got the job done.
It's always interesting to me how the "Big flaws in Star Wars!" always vanish if you think about them a little bit!