Just a reminder. You do realize anything you automate like auto swapping CP, mass mail, anything for any innocent reason, does technically... well do something. I can't say what the something is because I'm not ZOS but it's not just conjecture. They do not like anything happening 5x, or 25x.
https://wiki.esoui.com/How_to_get_your_AddOn_removed
I only mention this because, you say it works 5x or 25x and then stops. Did you stop to think server side they might be blocking that?