>Are we talking about the same things here?
Yes. They need an enclosed, short space in which to feel safe in order to lay eggs. To be happy and well-raised animals, they need a 'flight pen' which is a soft netted topped pen for literal flight. They are birds, and they do need to exercise that ability. Further, their flight pen allows for them to exercise their natural pecking and 'hunting'.
You could absolutely keep them in a small cage. And they would be inhumanely raised creatures.
>Maybe the missing information is just how big of a cage we are talking about.
Small cage. Large flight pen. If the flight pen is a thing, then yes, it's too large for an apartment.
Maybe the missing information is just how big of a cage we are talking about. What are you envisioning when you say that? Are you saying that, if a cage is made to allow them to do that, it would still be too big for a typical sized apartment?
I used to live somewhere where I can see wild quail running around the house every day. I remembered that they liked to hide in shrubs and overhanging trees. The mother might peak out and then run out from one cover to another, with a string of chicks following right a long. I rarely remember them flying out in the open.