Bonjour is two systems running together: mDNS (Multicast DNS) and DNS-SD (DNS Service Discovery).
mDNS allows hosts (devices/computers) to be identified, while DNS-SD allows them to publish what services they are running.
Multicast DNS, as the name suggests, relies on IP Multicast, and specifically the multicast IP
188.8.131.52 (IPv4) or
ff02::fb (IPv6) (in your case, most likely the former). It seems DNS-SD works over unicast between clients.
I suspect the problem is likely in the forwarding of multicast packets. Some switches/routers will not pass broadcast/multicast packets between some network interfaces.
In the simplest case, for example, you don't want broadcasts/multicasts from your own local network going out to the web. In a large corporate environment, you may want to limit such traffic to defined organisational units or groups of computers.
At a guess I'd say your switches/router are configured to either block multicast packets going 'upstream' (to the router) or (possibly) limit the number of hops (not actually sure if that's possible). I'm not familiar with the Netgear switches, but a quick google search suggests there's a configuration option called 'Block Unknown MultiCast Address'. You may want to try disabling this in the switches, and/or specifying 244.0.0.251 as a 'known' address if that's possible.
It may be that in the specific configuration (device1 - switch - router - switch - device2) the switches don't think the router is participating in the 244.0.0.251 multicast, and so doesn't bother forwarding out that port. The router may be doing the same for the switches, or may not be multicast aware.
It could be educational to try connecting one switch to the other, rather than each via the router. They may 'play nicer' when directly connected together (just a guess though, and probably not helpful for your intended deployment).
This discussion could also be helpful to better understanding the multicast limitations of those switches too.