Hi!
You can try giving him some pineapple to help stop the poo eating. It's not 100% but it does work with some, it's cheap so it's always worth a try. At 5 months of age, he is probably teething and it possibly hurts to chew, so swallowing whole is the only option. Even if it's the small bites, if his teeth are hurting he won't want to crunch it. You might try putting some kibble in a sandwich bag and cracking it with a hammer. This way is much smaller pieces and easier for him to chew or swallow if it still hurts too much to chew.