The defence factory is where you go to build outposts and defendling huts. Upgrading it will let you build more defendling huts (maximum of 4) and outposts (maximum of 2). But of course, you need to deal with that fact of your dad holding in a fart and blasting right next to you.
The defendling huts house defendlings, which are like buildlings, only they build around your outpost(s). In other words, they build all your outposts' structures. They are the most expensive hut (other than buildlings, which cost amber) to build and maintain, and upgrading them costs a tremendous amount of lumber, the same amount to upgrade your defence factory to the same level.