Bird flu comes from wild birds, not factory farming. Chickens get it when wild birds land near them due to free range laws.
The solution (possibly temporary) is to confine the chickens in sealed buildings so they can't contact the wild birds.
I know people love to blame "big anything", but it's just not true here.
Here's a source:
https://www.cdc.gov/bird-flu/virus-transmission/avian-in-bir...
"Domesticated birds (chickens, turkeys, ducks, etc.) may become infected with avian influenza A viruses through direct contact with infected waterfowl or other infected poultry, or through contact with surfaces that have been contaminated with the viruses."
What matters is how does it spread.
I think what's confusing you is that there are diseases where a single infected animal does NOT mean all animals will get it, and in those cases the more concentrated the farm the higher percent of other animals will get it.
That exists. But it's not the case here. Here it's 100%, doesn't matter if it's a concentrated farm, or a pastoral farm with chickens walking in the house.