Note: this information is not useful in any practical situation that I can think of, reading this is almost certainly a waste of your time, unless this comes up as a question in bar trivia or Jeopardy.
I've been curious for a while how the game prioritizes different aftermaths and if they all overwrite each other, so I asked a friend with the appropriate SAM REMAs to test and this is what it looks like.
If you have Empy/Aeonic AM up and use Relic, it replaces all tiers of them.
If you have Relic AM up and use Empy/Aeonic, they will not replace the Relic AM, you will not get your Empy/Aeonic AM.
If you swap between two different Relic WS, they will overwrite each other, back and forth, regardless of duration remaining or TP used.
He does not have Prime or Mythic GKT so unable to test those. I have a SAM with S4 Prime, but he doesn't have Yoichi unfortunately.
If anyone has Koga or Kusa & also Yoichi and wants to test, feel free to let us know how it works!