This is a really interesting thing that legitamately actually happened! Here are some more facts about it I learned from listening to a podcast about it:
-Even to this day, no one knows what caused the start of the plague, or even what caused people to contract it. It appeared to pass through people watching others dance.
-At one point, the city constructed a giant dance floor in the town square and hired musicians to play for those who were dancing. When someone collapsed, they were instructed to play harder; the thought being that the sickness had to be danced out of them.
-This happened in an extremely catholic town, and people thought that St Vitus, the patron saint of dancing was angry with them for some reason. The city constructed a shrine to St Vitus on the top of a hill and told the family members to bring their dancers up to the shrine AND IT WORKED. Affected people who stood in front of the shrine recovered
-the best working theory that scholars today have as to why the plague happened is based on how terrible the living conditions in the city were at the time. People’s psyches just broke and threw them into a trance like state of continual dancing, and the reason why the shrine worked was the power of suggestion, or the placebo effect: people thought it would work, so it worked.
TL;DR: people in 1518 lost themselves to dance 500 years before Daft Punk told them to.