It must have been such a turn of the screw to go from treats and taking happy pictures to an awful life-and-death emergency, all in a moment.
Being able to connect a tragedy like this to some concrete cause would place it under your control... and you could make plans as to how to avoid something like that happening again. I'm sure it wasn't your flash, though. It wasn't in your control to stop. From the moment he began having a reaction, I suspect there was just nothing you could have done to change the outcome.
I agree with Speckledhen. It sounds as if he choked on something. If there was something caught in his throat he may have just aspirated a little bit into his lungs... that can be enough to do damage, even if his airway wasn't completely blocked.
It's also possible he died from something completely unrelated to what was going on at the time. I had a very young chick die who had been ailing for days, and she also "seized" at the time of death. She didn't choke. There were no flashing lights.
I'm so sorry this happened. I wish I could tell you that all you'll have to do is ______ in the future to ensure you'll never have to lose another chicken this way, but the truth is that you may never know for sure what happened. Sometimes that's the hardest thing to face. If it's a predator, a hole in the fence, an infection, a case of worms, there are concrete steps you can take to prevent other losses. You don't feel so helpless. This was particularly scary because it came out of nowhere, and there was nothing you could have done.
I'm so sorry.