He taketh the wise in their own craftiness. Men are, as Shakespeare says, "hoist with their own petard." They "fall into their own nets together" (Psalms 141:1-10 :11), while the godly, their intended prey, "escape them."
And this is God's doing—it is his providence which brings it to pass. And the counsel of the froward is carried headlong; or, "put to confusion" (Lee).