That is totally not what I took from the movie. It seems like you’re taking a super depressing message whereas I see a really hopeful one. Unless I’m misinterpreting you. Our failures and mistakes make us think we aren’t capable of becoming who we want to be, but if we continue to believe in ourselves we can overcome our failures and eventually become who we want to be. Luke doesn’t think he is the legend people believe in, but in the end he once again believes in himself and truly becomes that legend. In TLJ, the legend has both tangible and symbolic value.
The way you describe Lucas’ work is exactly what happens in RJ’s work. Luke overcomes his flaws and reaches a state of enlightenment.