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