“Amazing Spider-Man 2” spoilers follow; if you don’t want to know how the Electro got his powers, don’t read on.

In “The Amazing Spider-Man 2,” Max Dillon (Jamie Foxx) is a mild-mannered electrical engineer with an inferiority complex. That is, until he becomes Electro in one of the most blatant series of workplace safety-protocol violations ever committed to film.

He’s forced to stay behind after hours to fix a circuit. Without a buddy or spot — and thus not complying with Occupational Safety and Health Administration regulation 1910.120 — Max climbs to the top of a catwalk above several tanks of genetically modified electrical eels. He does so without the proper use of a standard harness, infringing OSHA fall-protection guidelines. He is unable to get another employee to shut off power, in blatant violation of rudimentary OSHA electrical guidelines. He balances on top of the catwalk railing and — without the use of standard work-issue insulated rubber gloves (see OSHA 1910.137(a)(1) for voltage-class requirements) — reconnects the cable. He then pushes the cable back into its slot, is severely shocked, falls a long distance into one of the eel tanks, is shocked by those eels and eventually becomes Electro.

This sequence of events — and essentially the entire plot of “The Amazing Spider-Man 2” — could have been avoided if Max’s employer, Oscorp Industries, complied with even the most basic workplace health and safety standards.

Not following the rules is a remarkably common way that characters in superhero movies acquire their superpowers. There’s an idea in Hollywood that egregious workplace accidents and blatantly unsafe laboratory procedures bring about unfathomable powers, instead of chronic pain, debilitating injuries and even death.

How often does this happen? Looking strictly at superhero films, several examples come to mind — the titular character in “The Toxic Avenger” (1984) had toxic waste spill on his entire body; Doctor Manhattan of “Watchmen” (2009) was caught in a radioactive-particle test; and Victor Fries, a.k.a. Mr. Freeze, became the most quotable Batman adversary of all time by falling into a vat of cryo-fluid.

If we look at the 25 top-grossing superhero movies as identified by BoxOfficeMojo.com, there are few powers that are clearly the result of accidents in the lab or workplace, some that aren’t and some that are in a gray area.

First, the obvious cases. This is a trope owned by Batman and Spider-Man. Jack Napier in “Batman” (1989) becomes the Joker after falling into a vat of chemicals in a factory. Edward Nigma becomes the Riddler in “Batman Forever” (1995) after continued exposure to a brainwave device. In “Spider-Man” (2002), Peter Parker got his powers after being bitten by a genetically altered spider that escaped from its laboratory enclosure. In “Spider-Man 2” (2004), Otto Octavius becomes Doctor Octopus after a fusion-power accident fuses robot arms to his spine. And “Spider-Man 3” (2007) sees Flint Marko become the Sandman after he stumbles into an unsecured particle accelerator.

There are also plenty of unsafe laboratory procedures. Hank McCoy becomes Beast (at least he gains all the blue hair) after injecting himself with an untested cure in “X-Men: First Class” (2011). And in the rebooted “The Amazing Spider-Man” (2012), Curt Connors becomes Lizard after he injects himself with an untested regeneration serum.

And though powers aren’t derived from workplace injuries in “The Incredibles” (2004), a substantial number of deaths take place while characters are working. Remember folks, capes aren’t a safe call.

Then there are the cases that aren’t workplace-related. Captain America isn’t a lab mishap; everyone knew what they were volunteering for with the experimental super-soldier serum. And with the exception of Beast, none of the other X-Men characters, as far as I can tell, have powers that resulted from a lab accident.

As for the gray area: We’re not enlightened in “The Avengers” (2012) as to how the Hulk got his powers, but in his comic origin story, Bruce Banner turns into the Hulk after being hit with a gamma bomb’s radioactive particles in the workplace. And is Harvey Dent’s transformation into Two-Face a workplace injury? In the comic, yes — he was hit with acid while prosecuting a criminal — but in “Batman Forever,” his circumstances aren’t explained. I don’t think that his injuries in “The Dark Knight” (2008) can be considered workplace-related. And is Selina Kyle being pushed out of a window by her boss in “Batman Returns” (1992) — only to suffer a psychotic break and become Catwoman — a workplace injury? Could be. Is Aldrich Killian’s infection with the Extremis virus in “Iron Man 3” (2013) due to bad laboratory procedures? I can’t see it.

So, speaking conservatively, of the 25 top-grossing superhero movies, a whopping seven contain instances in which accidents in the lab or workplace lead to powers.

What did we miss? Anyone have a favorite workplace incident that resulted in a superpower? In the comments, debate them and let us know your favorites. We’ll take the wisdom of the crowd and put together a table showing the results.