A striking detail stands out in nearly three decades of American mass school shootings: The killers mostly use guns owned by a family member, not purchased on their own.

As Congress, statehouses, school districts, retailers and various groups debate how to prevent a school shooting after a 19-year-old who legally bought guns left 17 dead in Parkland, Fla., much discussion centers on whether to raise the minimum age for gun purchases. But statistics suggest that a lack of gun safety at home also has played a big role in school...