Like so many things out there this has just barely a tiny kernel of truth in it, but is it tiny.
You will sometimes see posts on here where people talk about how much safer our eggs are than commercial eggs as far as salmonella or other things go. Commercial eggs are washed before we get them, not so when we collect out eggs. Salmonella is in the environment. It’s possible our eggs could have some on them. It’s possible you can get it by petting baby chicks or adult chickens. It’s possible you can get it if you let a pet dog or cat outside, then pet it when it comes back in. A lot of things are possible. It does not mean it’s going to happen all that often. It’s possible a piece of space junk will fall out of the sky and hit your home this afternoon. It’s possible you could be involved in a fender bender the next time you get in a car. How much are you going to let those things influence how you live your life?
Not every chicken has salmonella, a lot don’t. For thousands of years people have been raising free-range chickens in farms and even in towns and cities. Their kids work and play outside, as do the adults. Yes, at times some people that have free ranging chickens get salmonella. At times people that do not have free ranging chickens get salmonella. Not that many in either can but it can possibly happen.
We live in a society where it has become zero risk. If a piece of space junk might fall out of the sky we need to move into a cave so we are protected. If we night have a fender bender we can’t drive. We can’t have pet dogs or cats if you let them outside because of what they might bring back in with them. You can’t grow your own food or keep chickens for eggs because of what might be in the environment. I take certain precautions, like washing my hands and food when I consider it appropriate, but I refuse to live my life in fear like that.
That said, it is not pleasant for a kid to play in chicken poop. You might need to erect some kind of fencing, especially if your yard is small or the chickens like to poop on your porch or patio, at least until you can teach the kid not to automatically put everything it can into its mouth. But then are you going to let a kid that young play outside without supervision. Some people would call that child neglect. Salmonella from chicken poop is not the only risk. How far do you want to take this stuff?