The standard in kings is: did they measure up to David? Both Rehoboam and Jeroboam didn’t. Instead they led Israel and Judah away from God and to idols. They both were punished though to different degrees.
Through the prophets it is clear that God is in control regardless of what the king is doing. This is important to remember in our day as well.
One note : Rehoboam’s mother is named twice reminding us of Solomon’s sin and its consequences.