3rd Gen Why would counter miss?

What situations could trigger a counter attack to miss? I don't mean a fail due to a non-damaging move or special attack being used against counter, but completely missing two targets in a battle factory double fight. Pdb says the move has 100% accuracy.

For more context it was Pokemon Emerald. I was in a nasty situation with only a rental Miltank left against a npc that had two pokemon, a Flygon in the red zone and a Dugtrio that was still healthy. I knew I was going to be outrun since Flygon would have speed evs that Miltank didn't, and Dugtrio is Dugtrio. I also expected to get hit hard, probably by two back-to-back stab earthquakes.

With Miltank's bulk I had a chance to survive a turn of them both pummeling me, but not repeated turns, so I had to somehow kill both on my turn, or die. Miltank had Facade, Shadow Ball, Counter and Milk Drink. I don't normally use Counter, but since it was the only attack that could potentially get them both, and I was going to go last anyway I took the risk. I was hit by an earthquake from Dugtrio and Steel Wing by Flygon, lived both, and expected to get off massive damage, killing the Flygon and probably the Dugtrio, but instead I was greeted by a message that said counter had missed! After dealing no damage I died to another earthquake from Dugtrio.

Trying to figure out what went wrong. I believe bright powder is involved- and my research with bulbapedia tells me battle facility Flygons are carriers, but I can't find a Dugtrio that also uses it. Even if there is, they shouldn't appear on the same team due to the clause agsinst trainers using duplicate items. No moves had been used that affected my accuracy or raised its evasion. So can somebody tell me more about what might have happened to cause both pokemon to dodge it?
 
Counter doesn't target both opponents. In double battles, Counter is supposed to hit the last opponent that dealt physical damage to the user.

So if your Miltank was hit by Dugtrio, then Flygon, Flygon should have taken the Counter... which could have missed if it had Bright Powder. Moreover, Counter only retaliates the last hit of the last attack taken that turn, so even if you did hit the Flygon it would have only countered 2x the damage inflicted by Steel Wing, ignoring whatever damage dealt by Dugtrio's Earthquake. Same goes for multi-hit moves, if you get hit 5 times by Bullet Seed (125), Counter's power will only reflect the last hit.
 
Thank you for the clarification. I thought counter hit everyone who dealt the users physical damage, like protect can block everyone attacking, but learned something new. I guess one of the cool things about the battle frontier is that you get into these unusual situations that you wouldn't normally fall into and find out more about more about the games mechanics that way. I appreciate the research done to answer this complicated question.
 
I thought this question asking in a visual sense. (but I can see it's not).

Anyways, I was going to bring up counter as it's seen in smash brothers. Lucario still has to swing in the correct direction of his opponent after absorbing the move.

Spoiler:
 
Back
Top