There's not a catch-all for the situation you describe.
Numbers are great... unless you face a grenade, automatic weapon, etc. etc. Proper defense allows the mitigation of numbers pretty effectively in the real world.
Grenades are great... unless there is a good, prepared thing to take cover behind (like sandbags). They'll also fuck your hearing and make your teeth hurt with the pressure they put off if you're in truely close quarters.
Automatics are great... unless you don't know how to use one properly. It's harder than you think (and having seen certain members of a fairly well respected military in action, I'd say that applies to professionals too), and you can easily find yourself in trouble if you rely on it.
Shotguns aren't horribly effective against protected opponents, which is why they're used to open doors more often these days than deal with what's inside.
Pistols are effectively worthless outside of movies or against someone armed with something even worse (say, a knife). They are much harder to use effectively than any other firearm, despite what people think.
No one uses flamethrowers anymore. The simple reason in this case would be that most buildings are pretty flammable.
Etc. etc. etc.
I think the best thing you could have is a well practiced team. GSG, SAS, and other serious response units drill in replicas of the place they are deploying to if time permits, simply because knowing exactly what you're doing and how you're going to do it is much more important than your specific equipment. No matter how much prep you do though, things still go wrong and most special forces units like these actually have fairly lousy "success" records, depending on how you want to measure something like that.
In reality though, the best way to deal with an entrenched enemy is to not. Go around them, cut their supply line, and wait them out. Or knock down the building.