What is a bit perplexing is that they are generally pretty docile it’s just the occasional episode that surfaces. New to chickens so we’re flying by the seat of the old pants in many respects.
Could you please give some details of what an attack looks like and when and where they occur. Most of the time I see ambushes, hitting you from behind.
As you can see from the other posts different people have different experiences. I remember a story on here where if someone wore a certain pair of boots they were attacked, different footwear no problem. I remember another story where a woman was attacked the first time she wore a skirt out there. If I carry a water bucket none notice, they are used to that, but if I carry something strange, like a small camera, the rooster puts himself between me and the flock and tells them to be careful. Can you see a pattern with clothing or such? It may have nothing to do with the person but something else.
I think they can sense when someone is afraid of them. That does not mean that every rooster in the world will immediately attack if someone is afraid of them, but some could. Opposite to that one might see a strong person as a rival and attack, often from ambush.
I do not find a common thread where every rooster in the world reacts exactly the same to the same stimulus. Yours are not even roosters, they are still adolescent cockerels. Like many adolescents they may not always behave as rationally as many adults would and may be a bit erratic.
You do not need to answer my questions, they are there for you to answer to yourself. Why do you even want a rooster? There are plenty of successful flocks out there with no roosters. The only reason you need a rooster is if you want fertile eggs. Everything else is a personal preference. Nothing wrong with personal preferences, I have a few of my own. But those are a want, not a need. Why do you want that specific boy? Would another one do as well? This might help you establish your priorities.
I've had a few immature cockerels like that try to attack me. I've been able to train a several to not attack me. Some catch on pretty quickly, some not so much. I do not give them unlimited tries. I'd chase them down (none of this taking them off of the roost at night, give them immediate reinforcement), carry them around for a while, and hold them to the ground, rubbing their heads into the ground. No mercy. When walking in the coop or run, if he is in the way, walk through him. Give him no reason to think I am deferring to him.
A very few of these were OK after that, they never bothered anybody else. Just an adolescent that got over it. But a majority would be a danger to my wife, a chicken sitter, or the grandkids at a later time. Over time I went from an attitude of "well let me try" to a zero tolerance. There is not a rooster in this world that is more valuable to me than my grandkids.
You may be able to salvage him, I don't know. But I don't take that chance.
Good luck!