They failed on this particular episode. They planned a Clinton victory and had to rewrite a few scenes to make it match with TrumpsTrump's victory. But for Obama's election, they had better luck back in 2008.
You can see that theesethese episodes are written in a way that the winner can be changed quite easily. Very few scenes showsshow or speak about who wins the election.