Ecclesiastes 10 sounds a lot like the Proverbs, much of which Solomon also wrote. Before Solomon makes his familiar contrasts between wisdom and folly, he tells an interesting story. In a veiled fashion, he recalls a wise man who somehow prevented his tiny city from being destroyed by a great king on a rampage. Though we would love more details about how this wise man did such a thing, the point of Solomon’s story isn’t merely to tell it but to use the story as an example of wisdom’s superiority to power, which prepares the theme of the next chapter.
Power, raw and brute, is no good if one doesn’t know how to use it well. Thus, wisdom with little strength is superior because weakness moving in the right direction is better than power in the wrong direction. By all means, brothers and sisters, pursue wisdom, for it is far superior to precious jewels and the powers of great armies.