The Emperor's Wrath was the only wrench he did not see in the machine.
Nah he saw it coming, he just underestimated the threat that the Wrath represented. I mean he had already written about the expected encounter mid way through Chapter 3(although I think you have to take a LS decision to get the email about that). Only that version had the Wrath losing and admitting that Baras was the true Voice. So likely he was told that he would face the Wrath by the Dark Side Entity, but he discounted the possibility that he could possibly lose to his former apprentice.