The short answer is make sure you have at least three empty guest beds, at least as much food as slaves + guests combined (people under 18 don't count), and interact with your people daily. If the exodus has already begun, it may be too late to prevent them from leaving as one person leaving causes a drop in mood for everybody and low mood is what causes them to leave.
Talk, workout, and party with people if you want to keep them. Or just start the colony from scratch. If you have some people you really want to keep, you can throw them in the basement. Their mood will drop, but they will no longer suffer mood penalties when people leave. Once everybody is gone, work on the mood of those you threw in the basement, then send them back into the house. Follow the rules from the first sentence of this post and you should be able to hold onto them.
I've had it happen a couple hundred days after a new game on two separate occasions. It sucks, but you can always rebuild.
in my opinion, its to much work and effort to keep all guest and slaves. as mc you have to keep the system running and to improve it. but if you have nearly 50 guests and slaves and with 100 points stamina its imposssible, to keep everybody in good mood.
but maybe
ttyrke could think about some fine-tuning (I would say so).
if you could defend an attack on your settlement, your guests feeling more safe, and get a positive mood point, the same can happen, if your guards catched a thief, or if you got some other improvements. e.g. replacing the wooden walls with stone walls.
the other main thing is food. if you can keep the foodballance high enough, so that nobody is starving for a longer time, than your guests should gain a mood boost, too, because they trust more in your leadership.
last but not least i would suggest a family house, because its not logical why your own kids should become your guests. another point is, that your kids should have a larger bad mood tolerance than your guests, because they are family and blood is more worth than water.