A stagnant economy and a crisis in Iran doomed one president. Donald Trump could be next