All of Genesis is a story to explain to ancient man how the world came to be and how man came to be 'borken and away from God, the source of all life.
It is not science, just a story and whether Adam was A person or repesentative of A people, whther he even lived at all in the sense we have in Genesis, is irrelevant for the "moral" of the story.
See, even the first tiem I read genesis and saw they they didn't die right away, I assumed that the death was more symbolic and a metaphore for something greater than just a "oen time" punishment.
Could the story have been written better? well, from our POV in the 21st century, sure, but that isn't the point, it was NOT targeted to US.
God gave Adam everything he could need, but Adam and Eve WANTED more, their desire for their wantes took over they repercussions that they were told would happen, not to strange from what still happens to US nowadays, eh?
God warned Adam and Adam warned Eve that they would Die and they did, their bodies became old and feeble, every day that pasted they died a little more, they payed the ultimate price for their WANTS, they paid with their lives.