What if Solomon had been obedient to Torah and walked humbly? Would the kingdom have still been divided? All Israel followed the king. He led/caused the rebellion.
Now the word of the Lord came to Solomon saying, ” Concerning this house which you are building, if you will walk in My statutes and execute My ordinances and keep all My commandments by walking in them, then I will carry out My word with you which I spoke to David your father. I will dwell among the sons of Israel, and will not forsake My people Israel.”
1 Kings 6:11-13 NASB