Does older = wiser? Well, one of the oldest characters in Persuasion is the vain Sir Walter, so the answer is definitely not a resounding "yes." But there's plenty of foolishness among the young too. So how does a character get out of folly into wisdom? Suffering seems to help, as does thinking about the past to learn from mistakes – and admitting mistakes in the first place. It's not how old you are that makes for folly, it's whether you think you're always right.
Wentworth's folly is that he is too proud to come back to Anne after she rejected him.
Wentworth's folly is that he's not very observant of others' feelings.