There are two common mistakes here that can impact the smooth running of a lot of other scenarios. They don't have a lot to do with each other, conceptually, so I'll pull them apart.
1) It's Really Defy Extra Danger
So, PCs are in dangerous situations all the time, but some of them are already covered by other moves. For example, when Wizzrobe is unleashing a high-level spell, he doesn't have to make a Defy Danger roll first, to try to control something so powerful. The risk of channeling magic from the spellbook spells is already wrapped up in the Cast a Spell move. When Sir Justice is trying to Defend the duke from an assassin with a poisoned dagger, he doesn't have to make a Defy Danger roll first, because poison is dangerous. The effects of getting in the way of the blow are already modeled with the outcomes and choices of the Defend move.
Defy Danger is there to handle situations on top of the normal course of these moves - for example, when Wizzrobe is trying to unleash a spell while a stone giant is shaking him around like a rag doll, or when Sir Justice is over by the punch bowl on the opposite site of the throne room when he notices the assassin. Sometimes it makes sense to "soft fuse" Defy Danger to another move so its results partly reflect the other move's results - in Sir Justice's case, maybe the result of the Defy Danger roll to close the distance will see him take the dagger on a clean hit and additionally halve the damage on a 10+, similar to the results of the Defend move.
But let's move to melee combat for a second. A melee is a chaotic affair where each of the combatants involved is roughly equally dangerous to each other, and Hack and Slash is an attempt to avoid getting hit in the melee and strike a clean blow yourself. So when Fightgar rushes down three mechanical beetles, is that 1-on-3 fight a roughly equal combat, or is Fightgar at a significant disadvantage? It didn't sound like you intended the beetles to be particularly canny combatants, so while they'd still swing for beetle damage +2 as a collective due to the gang-up bonus, Fightgar can just engage them with Hack and Slash normally without any extra danger.
2) A Series Of Combative Events
You also mention that you were having a tough time staging the beetles' moves, "particularly when the players were successful with their rolls". This is a combination of a couple problems. The first is that "when everyone looks at you" is much broader than it appears. Fightgar fought three beetles, not all twelve at once, and you're the only person who knows what's happening with the rest of them. You absolutely have license to make moves with the rest of them to present dangers for other characters to deal with. Obviously you're not going to pan over to the last person to have a go and now two beetles have infiltrated their ribcage or something similarly high-test. You're going to be presenting opportunities, announcing future badness, telling them the requirements and asking.
In other words, the fiction is going to move forward. But what are the beetles going to be doing aside from trying to rip the PCs' flesh? Well, it's going to depend on:
- the things the beetles are capable of
- interesting features in the room
- what the beetles want to do: kill all humanoids, protect a space, preserve a relic?
- what the players want to do: smash all the beetles, get through as quick as possible, steal a relic?
Aside from the last one, you can get most of those from the sum total of your adventure prep: monster, dungeon, and danger prep, respectively. That doesn't mean you need to script out half a dozen possibilities, and it doesn't mean you need to stick to anything you've planned out if it doesn't make sense to do in the moment. But it should give you enough of a vocabulary that you can switch things up to react to player actions.