Allotriophagia fits your question, but hyperorality fits your elaboration upon it.
Allotriophagia is an obscure word (most dictionaries don't list it, but you will find it mentioned in medical and veterinary works if you do a book search) because generally if someone is actually engaging in allotriophagia then they have pica which is a condition of which allotriophagia is a symptom.
Allotriophagia is also used to refer to the condition, but pica is a lot shorter so even doctors and vets, generally no cowards in the face of a long word of Greek origin, seem to often prefer it.
But for the actual act of such eating itself, only allotriophagia is used.
It does not however cover infants' tendency to put a lot of things in their mouths; any ingestion is incidental so it's not an act of eating. (It would be a reasonable figurative use perhaps, but for allotriophagia being probably too obscure for a figurative use to do any useful conjuring in the minds of an audience).
A compulsion to put something into your mouth (which could lead an adult to behave like an infant in this regard) is hyperorality. It could be combined with or seprate from allotriophagia or hyperphagia (compulsively eating a lot, but generally restricted to food).