The Owls were 3-0 up and cruising after just 22 minutes thanks to goals from Chey Dunkley, Theo Corbeanu and Florian Kamberi.
But old habits die hard and Wednesday gave the home side a sniff of an opening when Lewis Mansell pulled one back for Stanley on 33 minutes.
Eight minutes into the second half on loan Burnley man Joel Mumbongo made it 3-2 and from then on Wednesdayites will have been fearing the worst.
There were a few hair-raising moments but the Owls managed to hang on for all three points and only their second League One win since the start of October.
Here's how we rated the Wednesday players...