News flash: I have written and published both fiction and non-fiction. I also know a little bit about literature, thanks. I am trying to adopt a Runner Persona that is somewhat less snarky than his former incarnation, but you seem to have a propensity to "lecture" people who are pretty obviously not in need of lecturing. I would not mention this if numerous others had not done so as well.
The point is, the authors of Matthew and Luke did not have the faintest idea of Jesus' genealogy back to Adam or Abraham. They invented these genealogies, as a standard literary device (as you say), for the benefit of their Jewish readers because the genealogies fulfilled Jewish expectations and prophecies. For those who do not already Know Everything, this is a good overview of what the author calls the cultural, literary and theological purposes of Matthew's genealogy:
https://davidschrock.com/2013/07/16...mbling-block-or-stepping-stone-matthew-11-17/.
You choose to characterize this as a "literary device" because it sounds more palatable than "pious fiction," which is defined as "In religion, a narrative that is presented as true by the author, but is considered by others to be fictional albeit produced with an altruistic motivation." There is no essential difference except that, to some, "literary device" sounds more reverential than "pious fiction" just as "biblical account" sounds more reverential than "myth" and "myth" sounds more reverential than "tale."
A genealogy that is not factually true is not a genealogy. It is akin to a myth, an account that is not "true" in a historical sense but makes a deeper point. To call a genealogy a "literary device" is to acknowledge that it is not factually true; otherwise, we would simply call it a genealogy and move on to its theological implications. To read it woodenly, as though it actually were factually true, is to engage in the same sort of thinking that leads to Young Earth Creationism, which is why the defenders of these "genealogies" are forced to do the same sort of tap-dancing that Young Earthers do. And, of course, these piously fictional "genealogies" serve as the very foundation of Young Earth Creationism.
But, hey, if someone's faith hinges on the earth having been created 6,000 years ago and on Hezron being the father of Ram, Ram being the father of Amminadab, Amminadab being the father of Nahshon and Nahshon the father of Salmon, far be it from me to try to persuade him otherwise.