“biblical plagues’ attacks on Egypt’s gods, with the river of blood, frogs, and darkness recalling Hapi, Heqet, and Ra”
Interesting. Were the various plagues a reference to particular Egyptian gods?
I don’t remember ever hearing that before but it makes sense.
https://www.biblestudytools.com/bible-stories/10-plagues-of-egypt-bible-story.html
Pertinent to this is a Reddit post by one tremblemortals 12y ago:
The age of the Old Testament is argued fairly heavily. There are those who believe it was almost entirely written/created during and after the Babylonian Captivity (late 500s BCE to the 530s BCE), and there are those who believe its own testimony that parts of it date to Moses. For the sake of transparency, I'm personally in the latter camp.
The Old Testament does not have many extant BCE manuscripts. Which isn't terribly surprising, honestly - Judaism wasn't exactly a major religion in the ancient world, and even the Bible itself attests that the Hebrews/Israelites/Jews (depending on what time period you're talking about) didn't themselves cling to it strictly. That's actually a major part of the Bible - Yahweh calling the descendants of Jacob to stop their polytheism and return to exclusive worship of Yahweh as the one God. The Old Testament even records at least one time period when the Israelites had so abandoned the worship of Yahweh that they culture had generally lost the scriptures until they were found while renovating the Temple. Add to this the mnemonic emphasis of Jewish culture - that the religious scholars tended to memorize the scripture rather than carry around the writings, though those did exist as well - and also add the general attrition of time, and it makes a lot of sense.
And the dearth of ancient manuscripts makes it extremely difficult to pin down exactly when each work was originally written. And again, with the preference for memorization over writing, it's likely that large portions of it were transmitted orally and memorized long before they were actually written.)...
So dating the Old Testament is an extremely hard thing to do.