I have not seen this myself, but there are two Software Update system processes. com.wssyncmldm and com.sec.android.soagent.
I app manager with system apps visible, you should be able to force-stop and clear data for both apps which should stop the loop.
Also, have you checked if the 5.1 update actually installed or maybe it failed each time. Clearing data might help with that as well. You can also try installing the update through a PC as well.
If if still does not help you can use ADB debloating to disable the Software Update apps which should definitely stop this, but might also stop OTA system updates.