I tend to use lots of traps to take out Mind Flayers. Afterwards, I'd use one or two tanks with spell protections against stun and put them in the front while the rest of my party used ranged weapons to eliminate the Mind Flayers.
If you like "cheese", then use the Staff of the Magi to get rid of them.