Legitimate parallel or not?
Joshua 10:17 – “Joshua returned, and all Israel with him, to the camp at Gilgal. But these five kings had fled and hidden themselves in a cave at Makkedah. And it was told Joshua, saying, ‘The five kings have been found hidden in the cave at Makkedah.’ So Joshua said, ‘Roll large stones against the mouth of the cave, and set men by it to guard them…’
Mt. 17:65-6 – “Pilate said to them, ‘You have a guard; go your way, make it as secure as you know how.’ So they went and made the tomb secure, sealing the stone and setting the guard.”
Speculation: the Jews thought they were going to treat Jesus as Joshua and the Israelites of old treated the five kings. The situational parallels are mentioned in order to highlight the role reversal in Matthew. The kings are brought out of the cave, and then hanged on trees, demonstrating that they were under herem, the curse of God.
Sed contra: the stones are plural in Joshua, as are the kings. The kings are killed after hiding in the cave, not before. The LXX vocabulary differs from Matthew’s in its words for secure/guard (φυλάσσω vs. ἀσφαλίζω).