Yes. This is akin to shouting fire in a crowded theatre [1] or phoning in a bomb threat. In the United States, freedom of speech is limited in certain cases where the harm caused by the speech outweighs the damage of limiting freedom.
Please stop using the "fire in a crowded theatre" phrase, it's not actually part of law in the US. [1] The standard for restricting speech in cases like this is if it poses a "clear and present danger". That's likely the case here, as a premeditated attempt to cause a seizure is a clear and present danger to epileptics. There's plenty of law to cite that doesn't depend on over-broad censorious decisions that got overturned later on.
https://popehat.com/2012/09/19/three-generations-of-a-hackne...