Genetics play their part. What is quite apparent that a bad dad doesn't necessarily produce bad sons and the son's sons haven't been bad either in my experience. It works the other way to. There may well be inherited qualities and for many physical characteristics someone with a good knowledge of the subject a good breeder for example will know what the chicks will look like, weight,shape and plumage, just from the parents.
The environment is everything else, no matter how one proportions it. The environment includes the keeper of course. What the envronment can do is provide a solution.
Mums and Dads for reasons unknown don't expect to have their 40 year old son living with them and having sex with the sisters, or even with mum. Most creatures seem to know this. You get the kids up to fighting weight, pack them a bag and show them the door.

Jungle fowl still do this as did the feral Fayumies my friend kept in Catalonia. Showing them the door isn't going to work if there's no where else to live. We humans have discovered this. Showing them the door with nowhere to live and no others of their species to mate with tends to produce rogue cockerels. One definitely doesn't want that in a back yard.
One has to have realistic expectations and a plan of action for when things go wrong.
Free ranging, nature helps sort these problems out with deaths assistance.
I got to the point where I appreciated this. I've had two and three males in a clutch and they formed a gang and were a complete pain in the arse for everyone. The Goshawk, or weasel, sorted most of these problems out and I might be left with one rather more sober prospective rooster.
Not everyone feels comfortable with the nature option or doesn't keep their chickens in conditions that enable nature to operate in the normal fashion.
I'm in this position currently with the two juvenile males and the probability is they'll get eaten.
I've never had a chick attack me, chick being any age until mother finishes raising them. I've had very few juvenile males attack me. It's mostly been full grown roosters and not many. People tell me I'm exceptionally calm around the animals and that makes a lot of difference. The right clothing at all times makes a lot of difference (very few people I know get this as a habit) The really difficult thing is to never, never completely trust any of them. Do not bend down to them as if you might when stroking a cat oblivious to the surroundings. Always be aware and concentrated on what you are doing.