The counterfactual view of "if only there were someone there to protect them," only marginally reduces the massacre to a battle where many people are still killed, albeit with some likelihood of there being at least some survivors. If we ask what could have prevented a battle, it's what hypothetically prevents every battle, which is, if not the cost/benefit to the combatants, at least the risk/reward yields some kind of equilibrium where people aren't killing each other. (I sympathize with the american 2A conservative view that reduces to preferring battles to massacres, but even they would agree most prevention is upstream of that.)
Massacres are not random, they work for the people who order them. They are not about taking territory or defending it, they are a demonstration meant to instill terror so that a target people will not fight or resist. It creates a fear that overtakes rational self in the population and reduces them to acting on fear instead of as people. The economics of brutality are such that local atrocities have a low risk and high reward that reduces the cost and effort to dominate the rest of the population. To think this way you must already see people as liquid and interchangeable, like Stalin's comment that the death of one is a tragedy but the deaths of many is a statistic. The men who ordered this massacre operate on that view.
This particular story of mothers binding the hands of their sons to prepare them for execution raises the question we ask about every other historical massacre, which is, "why didn't they resist?" The question itself gets attacked as blaming victims, but it's much more nuanced than that. The answer is because they were lied to. They didn't resist because they believed they could sacrifice their way out and that they were saving themselves and others by not resisting. History tells us over and over that they aren't.
How to prevent massacres? I don't know, but I do know we have to look at them coldly. The only thing I can see is that it's way upstream of the events themselves, and the necessary condition for every single one is a lie and a deception, and that deception is what we recognize as the real capital-E evil in all of it. We might not be able to prevent future massacres, but every person has the capacity to resist deception, and also to name it as what we recognize as evil. If you detect cancer early, you can stop it, but if you let it go, it consumes the body. The same can be said for deception, where all live with a little, but unchecked, it is consuming.