Are Shlomo's three adversaries a threat only at the end of his reign after he has sinned, or  are they not so much existential threats in Shlomo's era, as the product of current dissent which becomes the seeds of future destruction?

Shlomo's punishment is mitigated because of David. Why is Shlomo's fate different than Shaul's? What merit does David have that makes God swear to him that his sons after him can be punished but cannot lose the kingdom? 

Courtesy of the Virtual Beit Midrash, Yeshivat Har Etzion