There is very little for historians to go on when seeking to write a story of exactly what happened when the Bible coincides with historical events. The biblical stories, epics or sagas were written with a very different purpose than to inform historians. This is also true of other ancient documents. The historian needs to take the royal inscriptions of the Egyptians or Assyrians, for instance, as something other than precise records of events.
One of the ways I have tried to think about what actually happened is to fit events into the rising and falling of the great powers. Israel and Judah were minor powers. They needed weakness in the great powers in order to be free at all.
That is why I tentatively look for the rise of proto-Israel (the Israel of the Merneptah stele) in the power vacuum left by the fall of the powerful city-state of Hazor late in the reign of Ramses II. With a lot more certainty, I see the rise of Israel and the United Monarchy taking place during the long weakness of Egypt that began after the first decade of Ramses III.
This weakness permitted the growing influence of Libyan settlers within Egypt. When the Libyans finally took power and established their own rulers in Egypt, they looked to reassert Egyptian power in the north. David and Solomon had established a state strong enough to set borders with the Philistines and to form alliances with other states. Then Solomon died and the Libyan pharaoh struck.
Some historians have described Shoshenk’s campaign as a raid. I think it was more a prolonged exercise in nation building designed to reestablish Egyptian control of the land routes to the Fertile Cresent.
Shoshenk set up a dissident Israelite, Jeroboam, as a vassal king in the north, Egypt was happy to leave the nation divided with a rump kingdom remaining in Jerusalem. This arrangement worked until the power of Aram grew. Then King, Asa of Judah aligned himself with Damascus and Egyptian power once again waned. This forced the north to depend upon the patronage of Tyre.
In support of my view of Shoshenk a new archeological report by Shirly Ben Dor Evian (Israel Museum) finds that Shoshenk’s limestone inscription at Megiddo was not part of a stand-alone stele, but came from a city wall or a building. She thinks a stone monument might indicate a mere raid, but an inscription that was part of local architecture means at least “aspirations of hegemony”. See here.
Egypt’s sphere of influence in the Levant expanded and then contracted. A detailed history of this long-ago time is denied us. But by paying attention to the geopolitical trends and what we can dig up from the layers of the past, I think we can get an idea of the broad outline of events.