Children have always been able to tell a "gross" joke, but not a "dirty" joke since I started playing in 2015. However, it was always "Tell joke about gross food." Children could tell that joke to each other or to any older Sim --- but not to younger Sims (all toddlers.) I don't know if that helps.
I just looked at your screenshots, and "Be gross" is to belch or pass gas. "Be gross" came with Parenthood for all Sims, including toddlers.