i have a 5 and 7 year old now. i had them both out on the boat (Kirie elite 29) first when i got it back when they were 3 and 5. i have had my oldest on a nacra 5.2 when he as 3, with life vest and under 5kts of wind. it is easily doable, but you have to be confident in your ability to sail. i have taken both boys out by myself in good weather, under 10kts of wind. they are used to being on the boat. during sail changes, or spinnaker gybes i would have them sit in the cockpit or go below. they like being rolled around during tacks down below. they also enjoy the fact that after a tack their toys may be in a different place.
i have a netting on my lifelines and that helps a lot. it is very hard for them to slip overboard with the netting. it can make docking with the lines a bit more annoying but the safety factor is well worth it. there are just a few places on deck where they are not allowed to go. they are markers there so they know if they are caught there they have to sit in the cockpit in timeout for few minutes. these areas are the close to the bow where the netting starts to get lower and the very aft part of the cockpit where there is only the lifeline for boarding. since this is right behind the wheel it is easily watched, but they know they should not cross the back there because of the lack of netting.
of course they are required to have a life vest on when on deck at all times. i have many vests on board so their are plenty when/if they want to bring friends.
they can get bored pretty quickly, so give them a job. skirting the jib is always a fun task for the stronger one to do. while stuffing lines in bags is a good one for the younger ones to do after tacks and gybes.
my boys give me lots of chances to practice my MOB skills. most of the time it is because they dropped a shoe overboard or some other object that floats. they understand that this is not a good thing, and they have to be more careful. it is dangerous and everything needs to stay on board when the boat is moving. along with this they all know that it is important to always keep an eye on the article and help me in retrieving the item.
as with sailing itself if you keep your head and think ahead having young children on a boat is very doable and very rewarding.