Ok, I just had a sudden realization.
I'm currently re-watching A New Hope (plan on re-watching the movies in
Machete Order), and it dawned on my why Storm Troopers appear so ineffectual during the Death Star rescue.
Simply put, they're letting them go on purpose. They're intentionally losing the fight.
Vader has a homing beacon installed on the Falcon, right? So he's ordered his men to put up an effective show, while still letting them get away.
Contrast this with how effective they are boarding Leia's ship at the beginning of the movie. They kill most of the rebel troops and route the rest, and we only see two dead Storm Troopers, despite fighting in a narrow hallway with little cover.
I'm a little surprised I never caught onto that.