Your first scripture reference is from prophesy, whereas the last three references are descriptive of actual events of the people in the record. The first one of these things does not match the others.
In prophesy, we have to recognize prophetic symbols and language, as God used metaphors to warn of coming judgment. In prophesy "heaven" was the ruling authority of a nation; it was the rule of a king or the highest authority of that empire. God raises up whom He wills, and removes them from power as He wills. (Judges 2:14, 16; 1 Sam. 2:6-10, 35; 2 Sam. 3:9-10; etc.)
As kings and rulers rule at the pleasure of God, and as they exercise authority over the people of the land, they live in luxurious palaces, and live with servants to do as they command, they abide in a type of heaven that is higher than the common people of the land.
In prophetic language, the common people of the land are referred to as "earth". In warning the children of Israel to keep God's covenant Lev. 26:19 says,
"and I have broken the pride of your strength, and have made your heavens as iron, and your earth as brass;"
Your heaven and your earth.... the ruling authorities and the people occupying the land.
So, in Rev. 12 when there was a war in heaven, it is not speaking of the actual heaven where God has his throne. There is no evil in heaven above. The heaven of Rev. 12 was the ruling authority that was waiting to devour the man child, and the newly born church of Christ (vs. 4). He was waging war against Christ (Michael) and the disciples and apostles of Christ in the land, on the earth... which was Judea where Christ was born, and Jerusalem where the church was born on the day of Pentecost.
Then, vs. 9 where the dragon / devil and his messengers / angels / agents were cast down to the "earth", it means that he was removed from that ruling position of power and was no longer in a position of absolute authority to persecute the saints. He was bound for a time.
Those that were accusing the saints in that century when Christ was born were the same ones who were the cause of the crucifixion of Christ... the Sanhedrin. So, the adversary of Rev. 12 that was cast down to "earth" was the Sanhedrin of Jerusalem. The dragon / devil would eventually be resurrected as the power and ruling authority of the Caesars of Rome, especially of Nero.
There is a good discussion of the symbolism of the great dragon [here].1
You can find further scriptural evidences of the use of "heaven and earth" as the idiom for the covenants of God, both old and new, at my blog - "Heaven and Earth Have Passed Away" [here].2
There is an actual, literal heaven where God has His throne. But, He uses the word "heaven" in prophesy as a type of authority under His rule that is above and over the people of the land, just as He is above and over all the earth.