Ergotism? Probably not. Too coordinated, too much endurance, limited to German ethnic locales, lack of other symptoms,...
Hysteria? Maybe. Maybe hysteria following a belief in a religious superstition about a curse; “Sancti Viti-St. Vitus’ dance, St. John’s dance, tarantism”.
https://en.wikipedia.org/wiki/Dancing_plague_of_1518#Theories
Various instances of mass hysteria, quite a few related to superstitions,...
https://en.wikipedia.org/wiki/Mass_vision#Dancing_plague_of_1518