Stormtroopers were never incompotent in the films.
They dominated the Tantive IV.
They were ordered to let Luke and friends escape the Death Star which explains the stuffty aim.
They bulldozed the rebels on Hoth.
They would've gotten away with capturing Luke's friends on Bespin if Lando didn't betray the glorious Empire.
They lost to Ewoks but remember when the rebels were captured by them and would have been eaten if Luke didn't use the force?
And all of this can be seen in the films themselves without any novels, comics, or behind the scenes talk.