Rashi to Yebamoth 63a, describing Naamah the Ammonitess' prolific progeny (which began in the Davidic line with her son, Rehoboam), mentions Hezekiah, Asa, and Jehoshaphat, whom he lists as 'wholly righteous'. What about Jotham and Josiah1?
Jotham has no stated faults, other than the high places, but Asa and Jehoshaphat also have this fault. Josiah may have erred by not heeding the word of God from the mouth of Pharaoh Necho, but each of the 3 mentioned kings made mistakes too. Hezekiah showed off his wealth to a Babylonian king, (allusion in Chronicles). Asa imprisoned an seer for rebuking him, and consulted physicians about a foot disease, instead of turning towards God. Jehoshaphat attempted to ally with the wicked Northern Monarchs multiple times.
Why does Rashi leave out Jotham and Josiah? are there flaws in them that are not stated in-text? Is there something exceptional about Hezekiah, Asa, and Jehoshaphat that sets them apart even from other righteous kings?
1. Amaziah turned to idols and was deposed. Uziah/Azariah was stricken with leprosy for a misguided attempt at seizing the priesthood, and he lived out his days in this state, which I could accept as meaning he was not fully forgiven.