Do you know how many people have small scale chicken 'farms' on their property in rural areas? These chickens roam free, and the cost per egg is often cheaper than it is at the grocery store. The overhead comes from paying a distributor and a grocery store owner.
You absolutely don't need factory farms for 'poor people' to be able to afford eggs. They exist to pad profits on a multi-level enterprise. Anyone with a bit of land can produce eggs at competitive prices, so the market would self cap even if you outlawed cruel farming practices (yes, it would be a tiny bit higher than it is now).
Idk about your region, but I quickly checked a platform that sells free-range eggs directly from the rural area farmers in my region, they cost about $6 usd for 10 eggs.
On the other hand, eggs from caged chickens in supermarket cost about $1.5-$1.8 USD for 10 eggs, even the more expensive ones cost less than $4. This is in big city too.
So what you described doesn't happen everywhere. In my region there is like $2-$4 usd "chick welfare tax" that you need to pay if you care about their living conditions.
Edit: maybe you can argue that if people drive directly to a farmer and negotiate a price instead of buying on a platform it will be cheaper than $6. But driving to rural area takes time and time is money. So you still have to consider that.
Edit 2: Just found another farm that sold 10 free-range eggs for $3.5, but adding shipping fee makes it $8 lol. This chicken welfare tax is quite high....