I would say the issue is that you use Integer A instead of your own variable, and thus the loop might not be stable because of the wait, but you did say you are getting the messages, so it's weird (unless you tested with multiple units, in which case this is probably indeed the issue).
Either way, never use globals if you are planning to use waits.
Suppose you have one unit start this effect, and then 5 seconds later another unit starts it.
The A global integer will be overwritten by each trigger invocation ("instance") running, and each one will mess up the other.
This is relevant to all globals, which there are many of in WC3.
Triggering unit actually happens to not be a global, so it's fine in this case (can't remember if casting unit is or not, there's probably a list of what's global and what not somewhere on the Hive).
What you should do, then, is use a local variable for your loop counter, which doesn't exist in GUI, so Jass it is! (via the Custom script action in GUI).
Suppose you define an integer variable in GUI called "MyCounter".
In your trigger, right at the beginning, you can add the custom script
-
Custom script: local integer udg_MyCounter
(udg means user defined global, that's how you reference the variables you create in the GUI variable editor when using Jass)
Now in your loop simply replace Integer A with your MyCounter variable.
This will "trick" WC3 into using your local variable instead of the global GUI one.
Local variables essentially create a new copy on every invocation of your trigger, and therefore it doesn't matter how many of these loops you run in parallel, they won't bother each other.
As a side note, please attach triggers directly using [trigger][/trigger], instead of attaching offsite images.