You can use the Shelly Smart Control APP feature "Wi-Fi batch change" to transfer your device to a new network. To access it, go to My Home -> All Devices and then click the icon at top right corner:
However, to do this you still need to have the old SSID available. Another option is to use the old SSID name and password for the new router. Otherwise, you must factory reset each unit and add it again with the new SSID.