Although I am unfamiliar with present-day academia, it seems to me that there is a somewhat general consensus that religion and myth, at their core, serve as a guide for the individual to help traverse the different kinds of psychological dangers one might encounter throughout one's life, and as a means by which to illustrate how to properly exist within one's own society.
As modern, "enlightened" individuals, this realisation comes natural to us, because we have an idea of how our world functions.
So my question is: do we have any idea of the way people perceived religion in a time where such information was not yet known, or at the least not readily available?
Thanks in advance!
Hi, religious studies is my field. I'm not sure your perception of how academics within the humanities understand "religion" is accurate. Some forms of religion include the features you describe, but almost universally anyone who works on this subject is going to tell you that "religion" as a category isn't reducible to any one feature, and that most scholars have actually given up on trying to pin down one static definition for it. "Religion" can be about all sorts of things beyond psychological function.
The part of your question about literalism is harder to answer. For one, there's no clean break between a past full of stories and a present full of science. A conservative American Christian may very well tell you that the earth was created in seven days and that climate change isn't real, which is the sort of thing I think you want to relegate to the past. At the same time, even those who claim to take stories completely literally are still doing interpretive work - even the creationist isn't expecting a monster with talking horns to rise out of the ocean during the apocalypse (Revelation). Additionally for most Christians and Muslims before the 19th century, truth revealed through scientific experimentation would have been seen as natural revelation, meaning that science was part of a holistic worldview--if we are in that camp, we learn about our world partly through explicit revelation and partly through examining creation. For the kind of split I think you are getting at, a lot of it developed during the nineteenth century. Geologists and biologists started making observations that were harder to mix with an approach that treated Genesis as history. This posed a problem for Christians more than other groups, but even for Christians, most of them just sort of rolled with the punches. (Some didn't, which is how we got Fundamentalism.) I work on American religion, which is why my answer is so heavy on that side of things. It gets much messier if we bring Hinduism, Buddhism, etc. into it. The understanding of a revealed text as literal history isn't a universal, and understanding a text as divinely revealed also doesn't necessarily mean that it is literal.
TL;DR people take stories all kinds of different ways, both today and in the past, and religion is often about more than psychological comfort