Excellent solution. I'll just add that it's also possible that the StormTrooper's shot will have no effect whatsoever, while the Red Shirt dies in an unrelated event.
Stormtroopers only miss important characters. Its plot armor. Star wars characters comment on the incredible accuracy of stormtroopers when finding evidence of shots that happened off screen.
He would hit the redshirt. Redshirts don't have plot armor.