Do unswitched neutral and ground wires need to pass through a transfer switch?
The neutral does not have to pass through the switch housing. Many wiring diagrams will show it passing through because a common conduit is the norm. The switch housing must be bonded to the system ground, your diagram does not show that.