Harry heads back in time armed with future knowledge. Fate/magic/the timeline doesn't like that and nearly destroys Harry, forcing Dumbledore to intervene so Harry can both live and keep his memories of the future.
I wanted to write this as a full snippet, but my brain's working against me so you just get notes.
Standard peggy sue setup, Harry goes back in time after the second blood war, to destroy Voldemort's horcruxes, capture/kill the Death Eaters, and stop the war before it starts.
Except, violating causality in this way takes a toll on him, as magic and time try to tear away his memories of the future; when Harry clings to those memories, the magic involved instead starts tearing away at his body.
Dumbledore becomes alerted when one of the widgets in his office starts blaring, warning that Harry is in danger. Taking Fawkes to Privet Drive, he finds an almost-11-year-old Harry unconscious, his body shaking and destabilizing, under the influence of what a diagnostic spell identifies as chrono-particles.
Realizing that a) Harry has time traveled into his younger self's body, b) the knowledge he brought back is enough to massively change the course of history, and c) the cost to keep this knowledge exceeds the value of Harry's own life and magic, Dumbledore and Fawkes whisk Harry back to a ritual chamber in Hogwarts to try and save him.
While Fawkes keeps Harry alive, Dumbledore uses his knowledge of alchemy and equivalent exchange to try and find a way to save both Harry and his future memories; something or some things of equal 'weight' to Harry's memories, that can be 'swapped' with them so that the effect of time/fate/magic will consume them instead of the future knowledge.
Sacrificing stored gold and other wealth has only a superficial effect; the Philosopher's Stone as a source of wealth and life does more, but still isn't enough.
Sacrificing souls, Harry's or anyone else's, isn't even worth considering.
Ultimately, Dumbledore does come up with something that will allow Harry to live and keep his memories of the future. Unfortunately, those things are Harry's identity, Harry's freedom, and the rest of Dumbledore's own life.
When ????? wakes in the ritual chamber, he finds his body feeling unfamiliar and being unable to recall his own name, having been reduced to a nameless changeling.
He can feel magic in his body, but it feels bound to a castle he recognizes as Hogwarts, house-elf style. Alternatively, he might be bound to a ring (or lamp), genie style.
And, though they haven't been introduced yet in this timeline, he recognizes a grieving Fawkes, and the body of Albus Dumbledore.
And...a Pensive.
When ?????, the nameless changeling, uses the Pensive, he sees Dumbledore, and an unconscious boy whose body is visibly falling apart.
The memory-Dumbledore explains everything; that the changeling who can't remember his own name was Harry Potter (though it innately feels like a lie to claim that name now), that he had traveled through time with knowledge of vital importance but the forces of fate attempted to erase his memories, and Dumbledore sacrificed everything he could except for ?????'s life and magic, in order to let him keep and use those memories.
And it worked. 'Brian' (the memory of Dumbledore said it was okay to borrow one of his names) doesn't remember himself, but he remembers everything else. The Horcruxes Voldemort created and their locations, the identities of his servants and the proof of their misdeeds, future discoveries, future spells, future potions...
...Was it worth it? Surely it has to be.