Marilyn Agrelo’s sweeping look at the origins and impact of the revolutionary kids’ show transcends nostalgia, documenting television and cultural history alike.

“Street Gang: How We Got to Sesame Street” has the good fortune to be arriving with about a hundred more built-in advantages than most documentaries. Offering up vintage backstage footage of Jim Henson and Frank Oz operating the Muppets feels a little like Henry Houdini coming back to reveal all his secrets. For parts of a nostalgically inclined audience, almost everything beyond that might be gravy. Yet that’s almost the least of the pleasures in a highly satisfying HBO documentary (premiering at the Sundance Film Festival) that wisely places roughly equal emphasis on how the sausage was made and how the culture was changed. It’s hard to ask for much more than a doc that captures creatives thoughtfully sneaking the civil revolution as well as basic education into children’s TV and includes a Muppets blooper reel.

As key veterans of the show’s early days discuss the development of “Sesame Street” in 1968 and ’69, still photos show conference rooms full of men in suits and women in mini-dresses, sometimes with cigarettes in hand, and your first impulse may be to think of the “Mad Men” cast of characters gathered to come up with kid stuff. That’s even before one of the suits shows up in a vintage clip to explain that they’re creating the public-television series “the same way a commercial enterprise would create a campaign: We’re trying to sell the alphabet to preschool children.” As a bonus, “Sesame Street” had its own highly enlightened and empowered Joan — literally: Joan Ganz Cooney, who was more than up to the task of developing a new kind of infotainment when the Children’s Television Workshop got $8 million of the government’s largess to produce an educational show that brought in ever-surprising levels of counterculture-influenced irreverence and cultural sensitivity.

In one interesting element of role reversal, it was such a shocking novelty in the late ’60s for a woman to have that powerful a role in entertainment that Ganz Cooney was embraced, at least in media interviews, as the public face of this unexpected smash. She undoubtedly deserved all the credit she got, but notes in her fresh interview for the documentary that the attention trained on her left the legacy of Jon Stone largely unsung.

Stone, who produced and/or directed the series from 1969 to ’94, is seen and described as a jolly presence (and workaholic) on set, but also someone who battled lifelong depression, at least a little of which might have been connected with his lack of recognition as a co-creator and showrunner. “Street Gang” seems designed in part to rectify that; it’s as much a love letter to the late Stone as a nearly two-hour ensemble documentary with about 20 other high-minded and entertaining principal characters can be, and Ganz Cooney seems relieved to get to share the due.

An almost throwaway clip from the series has its first, short-lived “Gordon,” Matt Robinson, coming up between a white man and Big Bird, quipping, “Did somebody say mixed neighborhood?” Coming this close on the heels of live-action series shows that existed mostly to sell products to latchkey kids (an insert shot of a clown wielding a giant Tootsie Roll says it all), “Sesame Street” producers had the chutzpah to set the show in a semi-realistic locale that suburbanites might then have uncharitably called a ghetto.

As much as the kids growing up on the show’s early years might have taken the locale or diversity for granted, its cheerful integration did not go unnoticed by some alarmed grown-ups. A fascinating news clip has a Mississippi public TV rep, asked why his station canceled a blockbuster like “Sesame Street,” explaining it’s a “difficult question” whether racial intermingling had anything to do with axing a show seen nationally by 12 million kids a week. (When Mississippi’s major-network affiliates started airing the show instead, the balking public station saw the light.)

Few conflicts among the show’s cast or creators are portrayed in director Marilyn Agrelo’s overview, and when they do arise, it’s mostly over small matters of principle. One early disagreement is over the “Black Muppet” character, Roosevelt Franklin, created by the actor Robinson. Interestingly, Black parents, not so much white ones, took issue with the puppet, feeling it was too stereotypically Black, and so Roosevelt was disappeared from the show, a piece of what led Robinson to take his leave and be replaced as Gordon by the long-running Roscoe Orman.

A more unsettling exit that the documentary inevitably leads to is the 1982 passing of actor Will Lee, aka Mr. Hooper, which producers decided to address head-on in a scene where the human cast tries to explain the finality of the situation to an uncomprehending Big Bird — but only after commissioning research on the question: “What do 3-to-5-year-olds need to know about death?” (Answers: He’s never coming back, and it’s okay to feel all your feels.) If this doc were playing at a non-virtual Sundance, there might not be a dry adult eye in the house.

Agrelo deftly addresses a fleet succession of topics, touching on almost everything you ever wanted to know about “Sesame Street” but were still too enchanted by the magic to ask. Clips of key figures no longer around — like, of course, Jim Henson as well the great songwriter Joe Raposo (who recounts writing the unlikely racial/loneliness anthem “It’s Not Easy Being Green”) — and the many who still are. Notably and regrettably missing amid contemporary recollections is Oz, who produced his own recent doc on the Muppets, and maybe has that or other reasons why it’s not easy being seen. The doc ends after Henson’s 1990 funeral, maybe feeling that, after making the audience feel sad about him and Mr. Hooper, it was better not to proceed onto Stone’s death from ALS in 1997, a few years after he retired from the show. (Also unaddressed: the show’s change of format in the 2000s and switch to the aegis of this movie’s producer, HBO.)

Although it’s emphasized what a departure “Sesame Street” was from much of the fantastical morning kids’ entertainment that preceded it, one point left dangling is how much of a fantasy its vision of racial harmony could be seen as today, in a still largely segregated America. But the film’s creators can be excused for not underscoring that rueful a note. In documenting the rise of a team of collaborators who came up with one of the most revolutionary — and most fun — series in TV history, they’ve encapsulated a near-miraculous experience that was basically what every kid wishes for as night falls: a good dream.