I can't comment specifically on the S40 but after my experiences with the S31 Zigbee I would be very cautious. The S31 Zigbee routing was very poor, had short range and weak signals. Some of my experiences are documented here. I bought an XBEE so I could diagnose the issue so it's not just a wild guess or unsubstantiated assumption.
S40 might be better but who knows.
Eventually I got rid of all my Zigbee S31's and replaced them with two of these.
My mesh is so much more stable with better range and signal strength and equally importantly only one instance of a device dropoff in the past two months. Previously it had been happening daily.
FYI I still use the S31 WiFi versions as I like the power monitoring and they are less than $10 on Amazon. Because they are WiFi they have a very good range. You can find a driver for them here [RELEASE] Tasmota Sync - Native and Real-time Synchronization between Hubitat and Tasmota 11 or later but you still need to flash them with Tasmota first.