soldiers. They couldn't hit a cow's arse with a banjo ...
Prior to the Disney era this wasn't really true, outside of spoofs. Oh no, it's after-midnight hobby-horse time! Look away!
The stormies in A New Hope zap the rebels easy enough on the Tantive IV, including Princess Leia, and then offscreen they successfully massacre the Jawas and the Lars family, as well as apparently taking out a sandcrawler with 'precise' blaster work. Not so great at Mos Eisley, but not visibly disastrous. Similarly they make light work of the rebels on Hoth, and don't do
too badly on Bespin either.
Post-mortems on the Endor business always seem a bit unfair. The Emperor's 'best troops'* initially capture the entire rebel strike force, shoot Leia, and kill a good few Ewoks, but it's not an open fight and they are outnumbered planet-to-legion and undone by their inferior knowledge of their terrain and their shitty, shitty armour and vehicles. (The Endor Biker Scouts are admittedly totally awful, as confirmed in Mando, but that's scouts for you).
In fact, in the whole OT it's only on the Death Star that stormtroopers are actual completely barn-door-missing
crap.
Except that this
exactly what they were supposed to do. Vader
lets the lads rescue Leia and escape, so that she can lead him to the Rebel base, which is the plot of the movie from his PoV. The Death Star plans are a secondary if embarrassing issue for Tarkin & Co because they believe completely in the technological terror they've created: finding and wiping out the rebels is the objective, and if it can be done promptly, the plans don't matter at all.
Because of this, the Death Star stormies are really order-following heroes, earning their Obi-Wan-endorsed reputation for precision marksmanship by missing
every shot, knowingly laying down their lives for the Empire. I'm sure they'd all have been decorated afterwards, if only, well, you know.
*This claim by noted liar Palpatine requires us to believe that for some reason he hadn't already stationed, and lost, his 'best troops' on the first Death Star and at the Imperial Vault on Scariff. These guys are the best of what's left.