Hmmm...hadn't thought about it before, but a day or so before we lost Pilgrim, he had a bit of creamy foam and I'd given him baking soda. We *think* he had UC. Would UC cause foaming for any reason? IDK.
Even if that's not it, your diet of goat chow, grass hay and browse could set up the right conditions for UC. Make sure his goat chow has ammonium chloride in it and I'd even add a bit to his minerals. A bit of alfalfa in his diet would help too.

I never noticed any teeth grinding though. A bit of crying, but I thought it was because we blocked Ari, our female Ana/Kangal, from his pen cuz she tore the hole in the fence big enough for him to get out and he was just lonely. :/
Sorry to get OT.
Norma, if foaming can be caused by UC and teeth grinding, have you noticed any teeth grinding and how is he peeing?