The response of the Lord is fierce to these derailments of Jedidiah, in whom he had joy (2 Samuel 12:24–25). Solomon deserves to lose everything. And that is the verdict, as we read here. He receives exactly the same punishment as Saul received for his disobedience (1 Samuel 15:27–29). It is even possible that Solomon made it worse by serving all the abominable idols.
1 Now King Solomon loved many foreign women, along with the daughter of Pharaoh: Moabite, Ammonite, Edomite, Sidonian, and Hittite women,