I don’t believe in the doctrine of attachment it was made up on the prequel. It exists literally nowhere in the original trilogy or the expanded universe before episode II. In fact Luke wins because he doesn’t follow what Ben and Yoda told him, his attachment to his father turns the tide of the war bringing Anakin back to the light.
I disagree. Luke rejects allowing his connections be used to control him in ROTJ. He literally throws his lightsaber down rather than allow Palpatine and Vader to use those he cares about to get him to compromise. Palpatine taunts Luke using the deaths of those he cares about, arguably his attachments. Vader taunts Luke with the idea of him getting to Leia. Both moments lead Luke to lash out and act in compromise. Luke’s moment of heroism is him rejecting that being used against him.
You’re correct that it was made up in 2002 for Attack of the Clones. But nothing about what Obi Wan or Yoda told Luke in the OT applies to it either.
They both suggest to Luke that it’s more important for him to focus on the mission than allow his feelings for his friends to compromise him. They don’t use the word attachment, but I think the idea of it is there.
Personally, I think this addition to the story harms nothing, but adds to it and makes the Jedi specific in their focus and goals.