Please note that a purge may happen when the device was inactive, due to losing connectivity, the device stop working, the device is not being used, the software inside the device gets stuck, the device is disabled, or the device malfunction.
The purge procedure is done automatically when the SIM card was inactive for a while, in order to free up the network of non-active SIM cards.
We would advise you to inspect why the device stopped working and perform a device restart in order to get the SIM connected back to the network. Please note that once the SIM card was purged from the network due to inactivity we can no longer reach or do anything with the SIM card from our end, therefore the SIM may be reconnected only due to actions from your end.
Kindly note that as a solution in the long term we would advise you to check if you can configure something like periodic pings or keepalive functionality from your end, in order to keep SIM active, even when it is not being used.