“Spider-Man: Homecoming” is one of the best superhero movies since Christopher Nolan’s “The Dark Knight,” proving that when it comes to the friendly, neighborhood wall crawler, the third time is the charm.

By rebooting Peter Parker’s story while our protagonist is still in high school, the new “Spider-Man” revels in the innocent fun of being a hero, a welcome antidote to a host of comic book films that have become overly dour and self-serious. Call it the Nolan effect. Ever since his “The Dark Knight” series dug for parallels with the Iraq War and other global tragedies, comic book movies have followed suit. In the process they’ve killed the joy — and the humor — that used to be part of suiting up in spandex.

It didn’t used to be this way. Throughout the ’70s and ’80s and even ’90s, comic book films usually didn’t rely so heavily on mass destruction. There was another kind of movie for that: depicted in disaster films (which all paid an homage to “The Towering Inferno”) such as 1998’s “Volcano” or 1997’s “Deep Impact,” starring Morgan Freeman as the first African-American president, warning citizens of the United States of their impending doom. But along the way, comic book movies stole from that genre. Or became a subset of it.

“The Dark Knight Rises” portrayed the total destruction of Gotham City in a way that echoed the Sept. 11 terrorist attacks. Zack Snyder’s “Batman v Superman: Dawn of Justice” made Metropolis history, wiping out what looked like its entire population. “Captain America: Civil War” choreographed the deaths of hundreds of innocent civilians moments after the opening credits rolled. And of course, there was “X-Men: Apocalypse.” That title said it all.

But that’s not the modus operandi behind “Homecoming.” As portrayed by Tom Holland, this Spider-Man is a teenager with grounded problems (like finding a prom date) who seems to get a genuine high out of swinging through New York City. No need to bring audiences down by getting all moralistic about vigilantism. And his crime-fighting is also a throwback to the days where superheroes weren’t necessarily required to the save the planet from terrorism in every installment.

The right-sizing of the stakes applies to the villains in “Homecoming.” This time, Spider-Man’s adversary, the Vulture (played with eyebrow-arching zest by Michael Keaton), isn’t hellbent on world domination. He’s interested in making a buck by selling weapons that use alien technology. He’s a crook, pure and simple — one who breaks the law to pay for a posh place in the suburbs, not so he can terrorize civilians. Kids, who make up the bulk of “Homecoming’s” audience, aren’t likely to get the kind of nightmares that they might suffer watching Jared Leto’s Joker, a sociopath without the feel-good smirk of the Jack Nicholson version.

Nowadays, too many Avengers movies and spinoffs hurtle toward the same conclusion. There are only so many times that Iron Man or Superman can lay major metropolises to waste while ostensibly defending the Earth from demented Norse gods or genocidal cyborgs. Instead of being thrilling, that kind of narrative gargantuanism feels rote. Worse, the screenplays are so focused on the CGI, they don’t even address the innocent lives lost in all those exploding skyscrapers. At some point, audiences must be getting tired of this collateral damage. Watching a major city burn to the ground can’t be called escapism when there’s so much terrorism in the news.

“Homecoming” gets back to the spirit of the comics. These are episodic adventures, where Peter Parker has to balance schoolwork with thwarting crime, and the crimes themselves veer more toward the bank robbery end of the spectrum. Hopefully other comic book films will take note. Maybe Captain America can save a few more people from muggers next time instead of uncovering a global conspiracy?

Despite its $175 million budget, “Homecoming” seems much smaller in scale than recent major studio popcorn films. It purposely evokes the John Hughes films of the Reagan-era, comedies where the action centered on learner’s permits and lunchroom brawls. “Homecoming” also catches its breath to dramatize some of the practical headaches that come with web-spinning. In one sequence, set in the suburbs, Spider-Man has to sprint across a golf course after running out of trees and buildings to swing from. In another inspired moment, he stumbles to put on his costume in an alleyway, practically tripping out of his pants while he attempts a quick change. Even Peter’s neighborhood, from his family’s walk-up apartment to the cat in his local bodega, are pulled off with an attention to detail that usually gets abandoned by most blockbusters that are so focused on crafting big screen spectacles that they forget to sweat the small stuff.

It’s surprising “Homecoming” works so well, because it’s a product borne out of corporate necessity. Sony, which licenses the Spider-Man character, has to keep making movies every five years or the rights revert back to Marvel. Hence their decision to reboot the film after two previous iterations featured Tobey Maguire and then Andrew Garfield as the costumed hero. The studio has had a bruising period at the box office, suffering a series of disappointments and duds such as “Passengers” and “Rough Night.” It has a lot more riding on “Homecoming” than a desire to do right by the character — namely a planned cinematic universe featuring Spider-Man villains and allies.

Sony’s ambitions for Spider-Man are vast, but the studio did learn from its mistakes. “The Amazing Spider-Man 2” collapsed under the weight of its corporate mandates. It suffered from the “too many villains” problem as the filmmakers shoved adversaries such as the Rhino and the Green Goblin into the film in order to pave the way for a Sinister Six spinoff film that has yet to materialize. Thanks to Marvel’s decision to get involved as a producer for the first time, “Homecoming” sets Spider-Man in the world of the Avengers, but it doesn’t overstuff itself with Easter eggs and shoutouts that excite only the most diehard of geeks.

Enough with comic book films so cloaked in darkness. Like “Wonder Woman” before it, “Homecoming” has hope and optimism to spare. What the movies could use more of are superheroes who wear a smile along with their tights.