Actually, we
do "know that." The presence of an insider during the battle of Jericho is right there in the Bible itself -- Rahab.
Now, whether or not the city mentioned here:
https://en.wikipedia.org/wiki/Jericho is in fact the right city is not the point. The point is that even as the wartime propaganda (which is basically what the account of the battle of Jericho is) gave the credit to the divine, the text itself offers a clue as to a more mundane possibility: The Israelites had someone on the inside who had the ability to smuggle people out of the city (and thus, the ability to smuggle them
in) and the ability to hide those people already inside.
Six days of the Israelite army marching around the city would allow five nights of sneaking in, a few at time, a small band of soldiers who, on a prearranged signal (one that would preferably also serve as a distraction to the soldiers on the walls) take Jericho's gatehouse and open it, or take a section of the walls and hold it long enough for more soldiers to climb over the top.
According to the Bible, exactly such a signal was given on the sixth day of the siege. The rest, as they say, may or may not be history.
Whether or not any of this actually happened is irrelevant. It's all there in the story itself.