
You got most things right. The emperor of the past didn't know about the brother molesting Heun secretly. Heun never told anyone about it, either. The spies planted by the brother were indeed real spies, but they were there to monitor Heun & the emperor, not for treason/rebellion. The emperor was probably in rage believing that Heun is the one responsible for the spies & he might be plotting treason, or using the spies to exchange love letters & set up a tryst at his own palace. Mind you, Heun is a man from an enemy clan that the emperor decided to trust & like. Any man's pride would've been wounded by that thought, let alone an emperor, who has an inflated ego to start with. So it'd make sense if his rational mind just left him completely at this point. And about the karmic reincarnation, it's something that the emperor purposefully did. Heun wants eternal rest. The emperor is the one filled with regrets, & he intentionally killed all those people in the past life, so he & Heun could be reborn, & get a second chance. This karmic thing will be something that the emperor regrets in the current lifetime, as he can see the impact it has on Heun.
so basically the heun was getting sexually abused/spied on by his brother, the emperor found out and misinterpreted the situation as him sleeping around with his brother, the emperor is upset bc 1) hes in love with heun and heun has previously rejected him 2) hes jealous and possesive; so as a result the emperor has a “trial” and accuses heun of being a spy or in a affair with his brother; heun insists that's not the case, emperor doesnt believe him bc hes blinded by jealously (though he was previously a very rational person when they met); results in emperor using this trial as an excuse to forcibly keep heun by his side as his lover (idk how the logistics of this)
heun: gets reincarnated bc maybe regret for no telling truth or the regret feeling of not being trusted or believed?