I will give you three different ways. Personally I think the second if it will work for you is the most efficient and simple
āāāāāāV1āāāāāāāā-
First Action
/castsequence [reset=target] Moonfire, Insect Swarm, Faeri Fire, nomorecasts
Second Action
/castsequence Starfire, Wrath, Wrath, Wrath
Third Action
/cast Wrath
āāāāāāv2āāāāā
First Action
/castsequence reset=target/combat Moonfire, Insect Swarm, Faeri Fire, nomorecasts
/castsequence reset=combat Starfire, Wrath, Wrath, Wrath
Second Action
/cast Wrath
āāāāāāāv3āāāā
First Action
/castsequence reset=target/combat Moonfire, Insect Swarm, Faeri Fire, nomorecasts
/castsequence reset=combat Starfire, Wrath, Wrath, Wrath, Wrath, Wrath
āāāāāāāāāāā
The ānomorecastsā at the end of the cast sequence in the first action makes that stop when it get to the end. You could also use ānullā but thatās not always reliable and using null could lock your macro.
Now in the combined second version once it hits nomorecasts, as it doesnāt exist, it stops locking the Starfire,Wrath castsequence and falls through to it. When your target resets, it goes back to moonfire etc. You could potentially reduce this even further to no need the second action. note: I am writing that this second version should work. It may need some testing.
If v2 works then you could potentially simplify down again to v3 and add extra wraths to the castsequence so that Stafford comes back at the right time. This version would work best if you were manually pressing instead of spamming however with castsequences and it not moving on until they work you could potentially still spam that.
In GSE2, the PreMacro the way you were describing using this in the past it would, from this example given, cast Mooonfire, ignore the rest of the PreMacro and never return there again. You also couldnāt do a 2 line or more action.