All this - resuming the “all” in Ecc 7:15; Ecc 7:15-22 is therefore the fruit of his dearly bought experience in the days of his “vanity.”
I will be wise - I tried to “be wise,” independently of God. But true wisdom was then “far from him,” in spite of his human wisdom, which he retained by God’s gift. So “over wise” (Ecc 7:16).