I dunno, that’s a question for God.
We know more or less what most ancient cultures believed based on their religions. So pick and choose a people and research their God/s
The easy “Christian” answer is to say Jesus death and “sacrifice” applies retroactively to anyone who truly believed in the same “one” God who sent him and didn’t worship other “false” Gods, etc.... So basically “accept the father” same as “accept the son” and you’ll be forgiven ultimately. Vice versa for Christians today who aren’t Jewish and have no real connection to the 6,000+ years of yaweh dealing with his “people”. “Accept the son/accept the father.”
Overall, the Bible says everyone will be judged. And God is just. So you just gotta “trust the process”.
Regardless what side questions you might have, if you believe in God can you really question his plan or criticize HIS STORY? That’s why questions like these don’t keep me up at night.
Some things we aren’t meant to understand 100% especially considering we live in this era/time and have the Coli of all places to spread the gospel

.
Accounting for the past isn’t our responsibility.
I’m sure the “ancestors” had their own answer to this question.
Anyways,
@MMS might have a better response though. although I’m sure
it might include ancient Egypt