I think it can theoretically be done if cost of time isn’t factored in. I could keep my coop chickens on what my farm produced but it would require full time farming on my part and sacrificing vegetables and fruits that could go directly to my family as being diverted to the chickens. I don’t think that would be practical or desirable.I have yet to see a backyard confined to coop and run chicken keeping model that makes a profit assuming an honest cost analysis.
This doesn't mean there isn't such a thing but I would love anyone to produce such an analysis.
Now actually I have turned a major profit on my coop birds while using mostly commercial feed to sustain them. But that was by selling my hatching eggs at high prices. There were months I was making 5 times the cost of food on egg sales.