Well first, I hope you know any weapon using this effect would have to be a primary weapon. If secondary, there isn't a way for players to activate both at the same time, and the AI wouldn't fire the muzzle flash at all since targets would almost always be out of range. So it could work for turrets, guns, and the like, but missiles and rockets (unless made primary) couldn't use this.
Now, as for actually doing it, allow me to explain. First make both weapons and an outfit for each weapon. Then decide which one you actually want to be the visible portion of the whole thing. That outfit will be coded normally. The second outfit will be invisible. This is done by leaving the 'lower case' name fields blank and flagging the outfit to show up in the Ranks/Honors screen. Also make the outfit a tech level that is never seen, change its Random Factor to 0, and flag it to be unsellable. Then use the Gxxx NCB in the visible outfit to grant itself and the invisible outfit upon purchase and Dxxx to remove both when selling.
In case that didn't make sense, I've prepared visual aides.
Here we see a list of Legacy weapons on the left and outfits on the right. I have 2 types of railguns and each uses the same ammo. Each example of the weapon also controls how much ammo the player can carry. For this to work, I require a 'dummy gun' that determines the max ammo and have it mounted alongside the real guns. Both railgun types use the dummy gun's ammo, and the dummy gun holds the ammo.
This is the outfit for one of the railguns. Take a look at the right side of the window, in the When Purchased and When Sold fields. As you can see, buying this outfit gives the player outfit ID 137 (itself) and 140 (the dummy gun). Selling it removes both, as well.
This is the outfit for the dummy gun. By leaving the 'lower case' name fields blank and flagging it to show up in the Ranks/Honors screen, the player will never see it in the Player Info window. The non-used tech level and Random Factor value of 0 make sure it never shows up in outfitters. Being unsellable keeps it from showing up in outfitters that buy anything (like Sirrusa in EVN) if it happens to be on the player's ship.
You might be wondering how to equip this on ships as stock without having it say something like '4 Nichron Cannons, 4 Nichron Muzzle Flashes'. I believe I've explained how to do this in the past, but I'll add it again here just in case.
In the image above, you can see 4 railguns equipped on this ship and 4 railgun 'dummy guns' added on in the outfits field. This makes them invisible in the Shipyard Info screen, as well.
Now that I've explained how to do it, let me also explain why it still might not work. As said before, the AI might not use the muzzle flash even as a primary weapon since it has negligible range. Remember, the AI can pick and choose which primary weapons to fire. They aren't forced to fire all of them like the player is.
But there is hope. If you can make the muzzle flash submunition into an invisible missile (missile weapon with an invisible graphic) the AI should use it. It might take some experimenting to find a combo that makes the AI fire both at the same time, though. And even if you find it, there's always the chance of the flashes not lining up should the firing ship be in motion when it fires.
Good luck with this, Delphi. It sounds like a neat effect, and if you can pull it off it'll make Delphi TC that much more epic.