I've been thinking about this recently and it's one of those innocent sayings that are quite insensitive. Growing up I heard this quite a lot, usually in response to being shy about asking someone out.
As an adult it's hard to view this as an encouragement when the flip side is women dislike men with insecurities, women dislike men who feel vulnerable when putting themselves out there.
I don't believe any of the connotations that I skewed from the phrase but it's better to suggest "women love a man who are brave enough to fail" as encouragement rather, if you want a basic encouragement.
One thing I learned way too late in respect to this, confidence isn’t being sure that you will succeed, it’s being sure that you’ll be okay if you don’t.