Werner Herzog, the prolific German filmmaker behind “Fitzcarraldo,” “Rescue Dawn” and “Cave of Forgotten Dreams,” has directed a 35-minute documentary on the perils of texting while driving. America’s four largest wireless carriers financed the film, “From One Second to the Next,” and released it online last week. AT&T will take the lead in distributing it to more than 40,000 high schools. Maddening and moving, it may be the first example of a new genre: the arthouse public service announcement.

Mr. Herzog was an unlikely choice for the project, but he was an inspired one. “From One Second to the Next” describes four accidents — two of them fatal, all of them preventable. It has the look and feel of Mr. Herzog’s other documentaries, with his subjects alternating between explaining what happened and posing artfully, even a little awkwardly, as if in a still photograph.

In some cases, Mr. Herzog was able to discover what the driver was texting just before the collision. Valetta Bradford, the mother of a now 8-year-old boy struck and paralyzed three years ago while crossing the street, says: “I’m told that the text was ‘I’m on my way.’ ”

Chandler Gerber sped his van into a horse and buggy, killing three members of an Amish family in 2012 — a 17-year-old boy, a 5-year-old girl, and a 3-year-old boy. The last message he sent was “I love you.”