Well, you'll eventually have to fight off tanks, but it's certainly a viable strategy.
Oddly enough, I've never had to fight off a tank. I've seen them moving around on the rare occasion that I had freedom of movement during a seige, but I think after a certain number of people occupy a site, the raid encounter becomes a single encounter where everybody in the whole site gets a turn before the bad guys can shoot. And I never saw the tank in that encounter..
Is it as simple as having more than a squad-full of 6 members?
The all-in-one type siege encounter occurs when you "sally forth" during a siege, using escape/engage before they assault the building. If you wait several days for them to come to you, you'll have the freedom of movement thing where both you and they are navigating your compound as separate units, and you can try to avoid enemies and attack them in smaller numbers after they hit your traps. The split up extended encounter is safer and much easier, especially if you invest in fortifications and traps, but waiting for it runs the risk of various dangers, such as having your tank traps removed by engineers. And if you didn't fortify the compound that is being assaulted, waiting during a siege will see random Liberals cut down by snipers even at low escalation levels.
Whether the siegers bring a tank is a matter of how escalated the siege is. They only show up in standard police sieges, and only when the siege is highly escalated. The escalation scale:
3. Soldiers + a tank
4. Soldiers + a tank + air strikes (only affects waiting during the siege)
It's possible to leap up the scale to higher escalation levels if you get really high heat before being detected, but typically you'll only see the upper tiers if you slaughter a siege force and don't abandon the base. They will launch a second siege shortly after with an escalated force level, and will continue to do this until you abandon the safehouse.
There's not really a good reason to park your butt in a safehouse that the police are launching sieges against, even if you can fight them off, so optimal play will typically just avoid the higher tier sieges. But they are there to deal with players who bank on just surviving anything the game can throw at them during a siege.
I believe you can also end up fighting a tank if you get into way too much trouble at the military base and don't leave.