The party got captured during a showdown with a major villain at the end of the last session: three of them died and the survivor got trapped while trying to flee the dungeon.
All four of them can cast spells, and the villain saw them doing so during the fight. He also saw that two of them have magical companions (it’s 5e D&D, they are an Imp familiar and a Ranger’s Primal Beast) that they can summon to help. He’s a spellcaster himself, so he’s intelligent and he’ll be aware of the capabilities of an Imp familiar, which is a handy companion to have when you’re planning an escape.
He doesn’t want them dead: he wants to send them as slaves to the even more-major villain that he’s working for.
As a clever person, aware of the escape risk posed by spellcasting characters with magical companions to help, I can’t see any reason why he wouldn’t just kill the two with companions and keep the other two bound and gagged, or even unconscious, until they’re at their destination.
But this is a game, and we’re here to have fun, so I’d prefer that not to happen. I’d prefer they weren’t even gagged so they can, at least, hatch an escape plot. I’d also prefer not to have a deus ex machina solution, such as a rescue party arriving, for the same reason as it robs the PCs of their agency. It’s more fun to come up with a plan yourselves. Ideally, I’d also prefer not to fall back on a tired old trope like "the villain is so arrogant he ignores your magical powers and leaves you unbound".
Are there some good ways I can give the players a fighting chance in this situation without making my villain look like an idiot, or taking away their agency?