I think Zoroastrianism was one of the first "revisionist" religion that literally demonized an existing pantheon. The deva become "devils," gods to be rejected, not paid worship, and regarded as evil.
A similar thing happened later with Christianity. The old gods of the Mediterranean and...