I have no idea how you'd get "I'm in pain" from the associated body language; but, then again, I'm not a dog. In this case there were behavioural cues, but I don't know how I'd tell if there weren't.
For toothache specifically, we'd do a differential check: does the horse eagerly eat a soft mash, but won't eat hard cubes? If so, time to grab that tongue and do a visual inspection (and if everything looks normal, it's still worth palpating).
(a typical vet complaint is that owners don't do any of the above, and first notice only when stench ultimately makes it obvious to check for toothache)
And in your strange example, if this dog wasn't eating due to a toothache, the parents are forcing the dog to anxiously eat through the pain of a toothache.
There are some times when as humans, we have knowledge that the dog needs to eat now, because they won't have a chance later, for example if going on some trip with the dog where feeding later would be inconvenient. In those cases it's useful to have this trick available.