Character Rescue from Game Over?

I got an idea while working on a game I have where, similar to Kingdom Hearts 2, there could be a secret character who has a low chance to pop in to save the party in my game when they WOULD be defeated, then leave after the fact. Would there be a simpler way to do this than going to every encounter and setting up an event to add a party member and then remove on victory/when all characters have been revived?
There are scripts for Ace that replace the regular game over with a common event to be processed - that is probably the easiest way, just search for them on Ace Master script list.
The script Andar is referring to is here: https://grimoirecastle.wordpress.com/rgss3-scripts/utility-scripts/game-over-common-event/

Original thread: https://forums.rpgmakerweb.com/threads/character-rescue-from-game-over.55834/