I just don't see pretty much anyone giving Jaime a chance once the Lannisters crumble, no matter what he does from this point onward. Jon, Dany, or Aegon would probably take Tyrion in and make use of him, but in the minds of most of Westeros, Jaime will always be a crippled oath breaker who has no honor. With any of the people who should end up on the Iron Throne, I don't see any of them being welcoming of Jaime, and they'd all likely execute him.
See, I'm holding out hope that if Dany ends up in KL, she will banish him to the Black cells before executing him for murdering her father.
But somehow Barristan will end up reading what he wrote in the White Book and it will give him pause about if everyone is wrong about Jamie. I just think that Jamie's time with the White Book will end up being significant and it will be what shows his true honor, and Barristan will see it and be impressed by it.
Barristan will contact Jamie in the Black Cells as he feels he owes him that much as his former squire and will be convinced that he has become a great knight.
I think Barristan vouches for him to Dany and may defend him in a trial by combat, perhaps against Sir Jorah, the same way Red Viper vouched for Tyrion, and Tyrion will convince Dany to let him have his trial in the hopes that his brother will be saved
This post was edited on 7/10 at 11:00 pm