Literary devices are specific techniques that allow a writer to convey a deeper meaning that goes beyond what's on the page. Examples are literary techniques like allegory, irony, humor, metaphor, imagery, and so on.
With this definition in mind, perhaps OP is wondering whether "吃了吗?", as a peculiarly Chinese informal social greeting, conveys a "deeper meaning" that goes beyond the mundanely obvious, namely, a general social concern for the well being of others?
If so, then as others have said, being having had a meal is above all else the super-conscious concerns of the Chinese people in days long gone by. It is today a matter of cultural politeness and social habit.
So, to answer OP's question -- "What literary device would we associate with the aforementioned Chinese old fashioned way of greeting?"
Well, perhaps "humor" as young Chinese people would LOL if greeted like such.
Other literary devices like allegory, irony, metaphor, imagery, Mmmmmmm...., I don't know as I am not a writer of satire.