Plugins are only for MV. Ace uses scripts.
Am I correct in assuming that the lowering of enemy's DEF and MDF, together with the Stun are done by using the Effects box, and are not part of the damage formula?
Am I also correct in assuming that you give the user the stunned state in the damage formula by having
a.add_state(8);
If so, I suggest you make a special state which combines the DEF and MDF debuffs, with the Stun. That is because you do not want these to be removed by damage in all battles for all enemies. They also need to be unique for the second part. For the sake of the example, let is say it is State 103
For the same reason make a special Stun state which we will say is State 104.
On both of them check the box 'Remove by damage' and set the percentage chance that this will happen that you want.
Use the new combined state in the Effects box and the new Stun state in the damage formula.
Having them mutually cancel out is going to be tricky. As far as I can see, the only way to do this would be in troop events.
In every troop where this enemy appears, first check for the Index number of the particular enemy. Set the troop page to run every turn, with span set to Turn.
Conditional
Is enemy X inflicted with state 103?
Yes - do nothing
Else Change state actor (whoever) remove state 104.
Another conditional
Is actor (whoever) inflicted with state 104?
Yes - do nothing
Else Change enemy (index id) state - remove state 103