The deaths are typically caused by a glitch in how the human memory operates, said David Diamond, a psychology professor at the University of South Florida who studies these cases. When people drive familiar routes, they can go on autopilot, an habitual state of mind that suppresses their ability to remember they had made a plan, he said.

For prosecutors, the critical questions are whether evidence exists that the parent meant to harm their children or knew they were placing their children in danger, legal experts said. There has to be some degree of intent to make conduct criminal.

“There always has to be some mens rea, some knowledge, intent, awareness,” said James Cohen, a professor at Fordham University School of Law in the Bronx, using the Latin legal term.

In Ohio, the Warren County prosecutor, David Fornshell, said he decided not to charge a woman in 2017 who had left her 15-month old baby inside her car with fatal results. He was ultimately convinced it was an accident in part because a security video showed how horrified the mother was when she learned she had not dropped her baby off at day care as she had thought.

“There’s nothing as a prosecutor that you are ever going to be able to do to that parent that is going to come close to what that parent is going to have to live with for the rest of their life,” Mr. Fornshell said in an interview.

In Oneida County in upstate New York, the district attorney, Scott McNamara, said he spent two months investigating whether there was any hint of malfeasance that could explain why Officer Mark Fanfarillo would leave his infant, Michael, in a hot car after dropping his older brother off at a different day care. He said could not find any.

“Just because you do something wrong doesn’t make it a crime,” Mr. McNamara said, explaining why he brought no charges. “After everything was done, and everyone was interviewed, we came to the conclusion that he just forgot, and I don’t think the law punishes forgetting.”