The honest answer is that not every "family visit" on offer in Morocco is what it claims to be. The medina touts in Marrakech and Fes have long understood that "come meet my family" is a more appealing proposition than "come to my carpet shop" — and that is where plenty of such invitations end up.
Genuine family visits have a few markers. The family genuinely lives in the home and is clearly in the middle of their normal day when you arrive. The cooking happens while you are there — not a tagine that has been waiting for three hours. There is no pivot to a product, no showroom attached to the kitchen, and no uncomfortable moment where you are expected to buy something before leaving. The family receives fair payment, either directly or through an operator with transparent practices.
The most reliable route to a real experience is through a private tour operator who has cultivated these relationships over years. Good operators visit families regularly, contribute to their income fairly, and choose hosts because the chemistry works — not because a commission is on offer. If you ask an operator how the family is compensated and they cannot give you a clear answer, that tells you something.
Rural settings — Atlas Berber villages above Imlil, families in the Draa Valley near Zagora, agricultural homesteads around Aït Benhaddou — often produce the most unselfconscious encounters, partly because these communities have less exposure to the commercial medina-tourist dynamic. A private guided day trip into the foothills with a stop at a known family can be arranged from Marrakech or Ouarzazate for around 800–1,400 MAD per vehicle (indicative), and the family component is usually the part guests remember most vividly afterwards.