I think I and others in the churches I attended would have thought of demons no so much as real but as an explanation for the various diseases Jesus 'cured' ....
Trouble is, the Bible is very specific.
The demons spoke to Jesus and identified themselves. He treated them as real. He negotiated with them as to what he would do. And significantly,
he moved them into other creatures.
That's the critical part. If this was a man who was insane, then Jesus could easily have taken away the insanity. There was no need whatsoever to transfer it into other animals. (Mind you, I could equally ask why Jesus couldn't just
destroy the demons).
At the very, very best, if the demons were just insanity, Jesus lied to the people around him. He let them believe that insanity was down to "demons" that need exorcising, rather than saying "look, sometimes people go insane, you need to treat them with counselling and therapy and medicine because you haven't got my mighty powers".
Instead, he left everyone thinking "yikes - demons are real, JESUS says so!!!", causing pain and suffering for people suffering mental health problems for hundreds, thousands of years afterwards. It means that every poor soul with a mental health problem who was beaten or starved to "cleanse them of demons", had those things happen as a direct result of Jesus' actions with "Legion".
So the "oh, it was just another word for illness" argument, IMO, just raises a whole lot more nasty questions than it answers.