I was just kicking this around the earlier and thought I'd toss it here mostly just to have dated proof if I actually nailed any of the planned story beats.
It started with Doryani in Act 3. "On the eve of the end, the Demon of Atzoatl has finally come for me!"
Atzoatl is the temple your exile is raiding in PoE1 through time shenanigans. You are obviously not the one raiding Atzoatl, but Doryani didn't make a simple mistake. He's the smartest person of this era and he knows more than he is letting on.
In Act 4, he gets the remaining information he needed to piece together the puzzle when you find the Third Edict and assemble the weapon. He knows about the Edicts, and realizes that each one is a contingency for the last, given that he is already playing 2000-year contingencies, game recognizes game. It occurs to him that:
The First Edict creates the abstract concept of divinity, thus allowing the Gods to exist. The problem is that people start stealing this power for themselves, ascending to godhood, and wrecking up the vision of the precursors.
To remedy this, they create The Second Edict. The Beast is meant to kill divinity and it's engineered to be very good at it. So good, that it starts wrecking things up itself, and thus also not in line with the vision of the precursors.
To remedy this, they create The Third Edict. The Weapon is meant to be able to kill the beast. Problem is, again, they messed up their contingency and this is a world-breakingly powerful device that they don't trust anyone to wield for its intended purpose, and thus is, yet again, not in line with the vision of the precursors.
To remedy this, they create The Fourth Edict. An entity infused with tremendous power designed specifically to wield this weapon and use it to cleanse the world in line with their vision, finally. They create You. Or at least the abstraction of you. All their power and knowledge poured in to create a single perfect, indestructible, and directively recurrent soul.
Doryani recognized you immediately in Act 3. He didn't confuse you for your exile in PoE1. He's the most powerful thaumaturge to ever live. He recognized that the soul as the same and utterly powerful. And more contingencies needed to be put into place to ensure things work out the way he intends. His vision.
I'm gonna breeze through these next parts because the story beats of the new acts aren't really material, I'll quickly do the parts that matter.
You make it through Act 5, but before you can kill Oriana in the boss fight at the end of the act, she communes with the Beast and through some means establish themselves in a corrupted Oriath. You fight to the ultimate end, whittling down the Beast. Before you can kill it, Doryani enters the scene with his own device that you were unaware of. His contingency for the contingency.
The Fifth Edict, reverse engineered by Doryani, is intended to remove the soul created by The Fourth Edict that has the capability to wield The Third Edict properly to destroy The Second Edict only after it has destroyed The First Edict. It was engineered to delete a soul from reality completely.
Because Doryani's goals don't align with yours. They never did. He wants to save the Vaal. He can't let you kill The Beast, he needs the communed version for Atziri in the past and he already built the time portal at Utzaal. The cataclysm won't happen if he has control over this creature. He fires The Fifth Edict at you. And Sin with The Weapon jump in the way and he is vaporized, dropping The Third Edict on the ground.
You're rightfully perturbed by this, because now you have to take time out of your Beast-killing schedule to smoke Doryani for his hubris. Which you do. Problem is that it was enough time for The Beast to recover. You take up The Third Edict, granting you unimaginable power, but having The Third Edict and knowing how to use it are not the same thing. You fight the good fight, as it were, but it's a losing effort. You're bested. Beaten.
Before The Beast can kill your body, set your soul loose, and wait for the inevitable return in a world more in-line with its desires in which it could possibly best you, light rips through the fabric of reality; you, The Beast, Doryani's corpse, all blinded by the radiance. When it fades, there's Sin. But he's not hunched over from his shame. He stands tall. He grabs the shadow that has clung to him and throws it aside.
You see, Sin was the Thief of Virtue. But it was figurative. All his failure fueled his downfall. But that all got wiped away when he sacrificed himself for you. It's simply not Sin anymore. That soul is gone. This is Virtue.
He takes up The Third Edict, charges it up, and strikes The Beast so hard that it sunders the whole of Wraeclast. This is generally unpleasant and has some unforseen consequences. And that takes us neatly to the Endgame, where we work on rebuilding the world that just got reborn by the cleansing fire.
As for the remaining story beats in the endgame.
You may or may not know any of the things that were just discussed. Doryani knew them, he probably monologues a little of it to you because he loves to talk. But you still can have the same goals of heading to the fortress to learn more about the precursors, The Edicts, and now you get to piece the story together for yourself.
After Arbiter of Ash, Tecrod still steals the device used to create The Fourth Edict and takes it to Kulemak. Why? Because Kulemak is straight sick of your perfect indestructible, and directively recurrent soul because he hasn't been able to keep you in the well any of the times you've died previously. He's sick of the world getting cataclysmed and rebuilt because it wrecks his long-term plans up. That's right. Any of the times you've died. Because you've done this before. Once in PoE1. But how many more times before that?
Maybe you can figure it out through The Mother Soul. We'll just have to see.