Also how do we join the Children of Armok realm? I can't find any of those interaction buttons anywhere.
You need to get in interaction range of any member of the realm you wish to join, not necessarily the ruler. Then Politics > Relations.
However, the information about return from farmers here does seem to say that there's really no downside to constructing everything you can construct, as the workers in the building really aren't missed from the overall food production picture.
There are two downsides. The minor is the workforce employed by the building, which could be working elsewhere. The major is that buildings consume resources, so if you make stables prepare to have a nice food drain in your settlement.
But this system is heavily exploitable. Towns which are anywhere near the cap in this system are massively inefficient. it is similar to Zeno's Paradox of the Tortoise and Achilles". You can maximize production by working out at which point the farmers hit break-even point, then switching everyone over that to some other job.
Actually, you are only taking one variable into account: food. What you say is true if you want to maximize it and disregard the rest. If you want to produce wealth (gold), then you'll need a higher population. Every building consumes resources. Temples (wealth producers), for example, will consume more than they produce at low populations. Same with several others, as building productivity is heavily correlated with population and resource supply.
Whilst I don't know if economic security has any direct impact on the game, it's also decreased by a low populaton.
It does. Economic security directly influences productivity. A certain number of militia will make the population grow (as the food productivity will rise, along with the rest of the resources). Past a certain level, the population will shrink again (as militia produce half of what peasants produce, and at some point the benefit from economic security will be eclipsed by the inefficiency of a large militia). So if you will increase productivity for giving a settlement around 50-100 militiamen, plus defensive structures (palisade, wood walls, so on).