We have done things that we wanted to do at the time, but in retrospect they were not wise. The thing that makes me doubt that Solomon was the wisest man that ever lived is that he foolishly had 700 wives and 300 concubines. If my math is right, then he had 1,000 mothers-in-law. That is not smart nor wise. (Sorry! Couldn’t resist.) On a serious note, Solomon’s problem was that the wives brought with them pagan gods that turned the people away from the one true God. This is where Solomon acted foolishly, and we act foolishly when leaving a legacy where those who come behind us are drawn away by our idols.
“As Solomon grew old, his wives turned his heart after other gods, and his heart was not fully devoted to the LORD his God, as the heart of David his father had been.” (He built houses of worship) “for all his foreign wives, who burned incense and offered sacrifices to their gods.” 1 Kings 11:4, 8b (NIV)