Dog food is not harmful to humans. Many many children eat dog food and none of them are harmed. Heck, I ate dog food as a child once or twice. The only danger to children is the fact that dog food is often very crunchy and poses a choking hazard.
To solve this problem is easy. First, tell you stepson it's bad behavior. Secondly, make sure the bag of food is out of his reach either on a shelf or locked in a cupboard. Thirdly, feed your dog meals, instead of having food sit out all day in a dish. Watch the dog eat. This way, you can prevent your stepson from eating the food.