Do I need to open port 5223 for iPhone push notifications to work when on wifi?
You don't need to open any ports on your firewalls for push notifications to work on your iPhone.

My iOS devices spent 90% of the time behind firewalls that don't allow any inbound connections to them. Notifications work fine (even with mobile data turned off).

The Apple docs at http://support.apple.com/kb/HT3576 do talk about port 5223. But they will be referring to out going connections on that port (even though they don't explicitly state that). Your firewall is unlikely to be blocking those, though I guess it is worth checking. I guess it is also possible that your ISP is blocking the out going port, but again that seems unlikely.

Despite the "push" in its name, Push Notifications are actually more accurately "pull" notifications (like most things with "push" in their name). The iOS device connects to Apple on port 5223 to listen in for the notifications.