In that scenario, I probably would have telegraphed that there are 20 storm troopers, but then have about 15 or 16 of them march off. That’s pretty classic Star Wars. The bulk of the storm troopers always seem to walk away, leaving the four or five screwups alone in front of the door, which is perfect right as the good guys sneak up. lol. Once the battle starts, then roll a timer: reinforcements will show up in 1d4 rounds as they call for backup and the sounds of battle can be heard. When reinforcements do show up, they come in waves, not all at once. This will feel grand in scale but still present a fair challenge.
I always focus on the 3Ts: Timers, Threats, and Treats. Here, we have a solid timer and threats. But what treats are there? Maybe these morons left a box of thermal detonators lying around. Or even an e-web the PCs could turn against them. Or maybe there is a rock slide or even a ton of falling logs, so they might get crushed, Ewok style. For sure, there has to at least be a loot chest in an inconvenient spot, just to kite off a loot monkey. There’s probably also a medkit nearby, just because these guys run into a ton of danger. Make sure you telegraph all these things, and let your players feel smart. There might even be a crate of random junk: super glue, a shiv of metal, and some rope. Creative players will find a way to use these items, if not utterly end the empire with them. lol
Next, is there some environmental difficulty? Maybe there is a portable shield generator protecting these guys. So, now, the PCs have to destroy this glowing thing before the enemies take full damage. And, if they destroy it, you’ve built in a perfect excuse to drop the target and teach them that sometimes the target can be dropped depending on their actions. Maybe there is a key data pad nearby that might do the same thing. Now, there are two opportunities to succeed in this way.
Finally, I never presume my players will stealth their way in. It’s always great if they do, but usually, someone just can’t stand it, so they open fire, or someone tries something risky and inevitably fails a stealth check. In that case, I always plan for: what does this combat look like if they don’t stealth their way in. See above. Ultimately, a lot of players feel like if you put it in front of them, then they have a chance to blast their way through. And that’s okay. The trick here is to plan for both ways the encounter can go, just so they have a richly rewarding experience no matter what they choose. That being said, no outcomes are predetermined. They could easily roll low, get outnumbered if they don’t deal with the waves or shield generator, and they could wipe. That’s all part of the fun. Give a thoughtful setup of a threat, and then see what happens.
In any event, you’re all over it. I would love to have these players at my table. Sounds like a fun group.