Nico Hischier had two goals and an assist, and Timo Meier also scored for New Jersey (13-7-1), which lost its third straight game (0-2-1) to end a five-game road trip. Jesper Bratt had three assists, and Jake Allen made 23 saves.
Meier put the Devils ahead 1-0 with a power-play goal from the right post at 7:37 of the first period. But what happened after is where the Devils felt the game turned on them.
"You look at how we managed the two shifts after we score," New Jersey coach Sheldon Keefe said. "Our power play goes out, works their [tails] off, scores us a big goal to get us on the board. The next two shifts after that really let us down and gets them in the game, gets the crowd going. Then we just unravel from there.
"Those two shifts after we make it 1-0 ... those two shifts, from what should be our hardest working people, those are unacceptable. That's something we've got to address."
Cates tied it 1-1 at 9:00 after Allen swept the rebound of an Egor Zamula shot onto his stick in the right slot.
Michkov then started the Flyers' goal binge when he scored on a breakaway at 12:06 to make it 2-1.
Foerster then scored twice in 17 seconds. He extended the lead to 3-1 at 12:15 when he scored on a one-timer from the left side, and pushed it to 4-1 at 12:32 after scoring off the rush from the right side.
The three-goal run was the fastest in Flyers history, surpassing the three they scored in 35 seconds twice previously (March 1, 1979, against the Boston Bruins; Oct. 7, 1982, against the Quebec Nordiques).
"I think we were opportunistic on our chances early on, and kind of played off of it, I would say, the rest of the game," said Flyers captain Sean Couturier, who had two assists. "It's good for the confidence to get a couple goals like that, and it's something to build on."