When you are ready to start installing the sockets, just power down the modem, wait a few seconds, disconnect the patch lead which connects the xDSL port of the modem to the filter, note the time and then continue with your electrical work.
Once the new sockets have been installed and all checks have been made, check the time. If more than 30 minutes have passed since the modem was powered down, power up the modem, wait for it to stabilise and then reconnect the patch lead from the modem's xDSL port to the filter.
Hopefully that will be sufficient to keep the DLM at bay.