Some things about farming. I usually never research further than the initial tech on this. What it does is raise the maximum population amount for the given planet. And, as you are noticing, the higher the population, the more your moral takes a hit. Pretty much, any population above 16 is going to cause your moral (on that planet) to plummet. So, the more efficient your farm, the higher your population can go, and the more your moral will tank.
Also, your over-all popularity is based on the average popularity. So lower moral on a single planet will have impact. Particularly if it is a high population planet (more influence).
What has been reccomemded to me before is, don't put a farm down on any planet with a base population cap of 16. Where you DO want to put farms down on are planets where you are focusing on Economy. The higher your population, the more income. So, if you have an "Economic Capital" and several Economy growth buildings, you want a higher population. Because this means more money. Again, be careful and don't go overboard on this.
Another reason that you may want a higher population on a planet is for invasion purposes. The more people you have on a planet, the more soldiers you have to jump to a near by planet occupied by another civ. Also, the higher the population on a world, the more troops you have to repell alien invaders. And the more influence that particular planet exudes (for the purposes of converting neighboring planets).
As far as the Star Base question is concerned, you can build modules that will increase YOUR ship speed through that sphere of influence and decrease enemy ships, again "through that sphere of influence". This a strategy wherein you have a couple of ships posted in the area. As soon as you see enemy ships coming in, you can send your ships after them. Since your ships are faster (due to the increase provided by the Star Base) and your enemy ships are being slowed by that same star base, you can defend a wider area. Throw in some sector scanners and this makes for a fairly decent defense. Keep in mind that, the more star bases you have relative to your logistics, the more expensive they are to build, so build with some restraint.