Don’t Factory Reset any of the SONOS units without further consult.
The easiest procedure when replacing a Gateway is to power down everything on the network before installing the new Gateway. Give the new Gateway the same SSID (WiFi name) and password as were used on the OLD Gateway. Now, power up the network clients.
Here are some instructions to help work through this. The easiest approach will be to install the old WiFi SSID and password into the Gateway, but this will affect any other devices using WiFi and they may need their WiFi credentials updated. Another approach would be to temporarily wire BEAM to the Gateway, then use this procedure to install install the new WiFi credentials. You can remove the old WiFi credentials at this time. After the new credentials are active you can remove the wired connection.