The Texas electric grid came within five minutes of a complete collapse in mid-February. The problem could have been much worse. A little-known network designed to jolt the grid back to life wasn’t working properly.

Texas grid operators, like their counterparts all over the country, rely on standby generators called “black starts.” Their job is to rescue the grid by supplying electricity to power plants so they can restart after a grid failure—roughly akin to jump-starting a car with a dead battery.

When a freak winter storm hit Texas, nine of the 13 primary generators designed to get a downed system going again were, at times, out of commission, according to grid operators. And six of 15 secondary generators—the fail-safe for the fail-safe—had periodic trouble as well, including freeze damage and problems getting fuel. Those problems haven’t previously been reported.

If grid operators had completely lost control of the situation—they didn’t, although they came close—the spotty performance of the black start units could have left Texans without power for much longer than a few days. How long is impossible to say, though by the grid operators’ own estimate, a total collapse could have caused weeks or even months of outages.

Pat Wood III, former head of the Public Utility Commission of Texas and former chairman of the Federal Energy Regulatory Commission, or FERC, said the poor performance of black starts in Texas stunned him. Were there an uncontrolled grid collapse, whether from extreme weather, a cyberattack, or some other cause, Mr. Wood said, they are “what keeps us from going back to the Stone Age.”

He said the Texas failures exposed a glaring problem that must be fixed, and fast. “These should be the most secure facilities in the country,” he said. ”We can’t afford to kick it down the road again. Ever.”