SO, at this point I think we can at least try and come up with a theoretical idea about the Prophecy, disappearing and ghost tricks, and the Midi-Chlorians
The Prophecy was made by the Midi-Chlorians, who with their extreme force empathy could see the coming problem of imbalance and devised the 'Chosen One" as a means of countering it. So, when Qui-Gon mentions that Anakin waspossibly 'conceived by the Midi-Chlorians", Windui immediately leaps in and asks if Qui-Gon is referring to the Prophecy, suggesting a strong Midi-CHlorian link (although Windu coul;d just be talking about what Qui-GOn is saying in general rathe than that specfic sentence).
However, for whatever reason, it all goes startlingly wrong with their Chosen One, and he worsens the Balance rather than restoring it. When it becomes clear this has happened, the MCs come upwith a new emergency plan- they communicate with the Jedi Obi_wan and Yoda, presumably the most capable still alive, and propose a new plan via which they can teach Anakin's son. To try and ensutre the success of the plan, they offer the two Jedi a chance to return after their death if need be,to carry on their task. But the price was heavy- they could ONLYfocus on their taskof teaching Anakin's child, and not interfere with the universe in any other way.
Whteher the MCs knew that Luke could turn Anakin back is unknown- but Yoda and Obi-Wan didn;t to think it was a possibility (though as Vader says, "Obi-Wan once thought as you did..." when Luke suggests the possibility.
So, in the duel with Vader, Obi-Wan sees the position for him is bad. he has known about the returning after death thing before hand, but obviously enough would rather have stayed alive. But in that moment, he knows that by 'dying' in full view and returning, he has his best hope to give Luke the adice he needs, without Vader even suspecting that such adivce is still forthcoming.
And when Anakin dies, the MCs pull their own creation back into the Force, and he re-jopins his friends.
There you go. Not perfect, but at least as credible as lots of other stuff I've heard.