I wouldn’t mind an indoor farm, if they come up with some system to control the smell.
I don’t think there should be any restriction on what people can build.
You could have a rule on bad smell, that applies to equally to everyone, so a farm would be legal, if they can control the smell.
Egg-laying chicken farm in between two multi-family units would be perfectly legal. I see this as a good thing.