Ridgerunner's response is obviously pretty pertinent to your situation as having them caged alters flock dynamics a fair bit because when a subordinate cannot evacuate the alpha's territory, this can be perceived by the alpha as a challenge or disrespect, leading to the subordinate getting attacked and the situation escalating as the alpha gets more enraged and the subordinate gets more anxious but cannot escape.
Some chickens will behave entirely differently if able to freerange than they will if kept caged. In general the situation becomes more prone to violence, bullying and neuroses when chickens are kept permanently caged, which is unfortunately a necessary situation for many. In selecting against bullies I learnt to have odd days when I caged them all day to see which young adults of each new generation would take out their frustration on others. Some chooks do, some don't. I found selecting against bullies a quicker fix than managing bullies or separating them, but each to their own, my flock keeping methods are not for everyone.
Chickens need stimulation just like pretty much all other pets or livestock and often cages tend to cause their stimulation to depend on one another, not their environment which is often very limiting and boring. Studies done on zoo animals found that having 'L' shaped cages, with corners they couldn't see around, improved their quality of life and reduced stereotypies or expressions of repetitive, obsessive neurotic behavior as the animals did not cope with being able to see every wall or corner of their cage and have nothing to investigate or explore. With chooks some litter to dig in is highly beneficial.
Giving them the best nutrition you can goes a fair way towards stopping the overpopulation related stress and aggression which is in my experience is in most cases largely based on both genetics (inherited social behaviors specifically) and nutrition more so than on actual flock size alone, though flock size does play a definite role. Controlling pathogens and parasite levels is part of controlling overpopulation stress as this is one of the main reasons they are distressed by dense populations. Using hydrated agricultural lime on all soils they walk on will help there. (It's the same stuff used for adding to animal feeds).
With perches, because I have a mixed flock, I make them at varying heights up to the top level so bantams and chicks can get up there too as well as injured birds. (Strict selection I've practiced against bullies for many generations now allows injured or ill birds to remain with the flock without them being attacked but removing injured/ill birds is the best choice for the average flock). The lowest perches are only around 6 inches off the floor sometimes. The very lowest perches also serve the purpose of providing something to duck under for birds being targeted by dominant birds; for some reason few bullies want to stoop under something to pursue a victim. I think perhaps it makes them feel vulnerable. Sometimes breaking the mental pattern of behavior is enough to stop a bully from continuing to attack and sometimes all that is necessary for that is a simple obstacle in the way.
I ended up setting up the perches in such a way as to enable me to access them easily and prevent social disharmony. The highest perches are around chest height and basically form a crosshatched pattern all around the walls of the coops, so I can easily inspect them at night time whenever necessary no matter where they perch. The crosshatching pattern stops any one bird from dominating the whole perch as some will do, with the lower perches giving subordinates multiple access points without involuntarily offending any alphas, and it makes it easier for chooks to segregate themselves according to social status and so forth.
With a single long perch sometimes you get dominant birds who habitually start at one end and walk along knocking or pecking every subordinate off the perch until they get to their usual or chosen roosting spot, and they can repeat that night after night, sometimes leading to subordinates sleeping on the floor if the alpha got onto the perch just before full dark. The lower perches help there too, as birds who get knocked off at night time can often find their way to a perch just by touch and get off the floor which is obviously pretty beneficial if you get very cold nights.
Best wishes.