In UT2004 Onslaught mode, vehicles spawned infrequently. Players in their own skins can respawn instantly but can't constantly be in heavy vehicles as the average respawn time for vehicles in that game is about 2 minutes. So basically when you climb into a vehicle you "are" that vehicle, but you are limited as to the amount of vehicle-piloting you can do. While the vehicles are spawning, the foot soldiers have to keep doing the work of trying to win the battle. Have the spawn time depend on the strength of the vehicle. Motorbikes might only take a minute to respawn, while tanks and gunships might take 5 minutes. This reflects construction and/or shipping times for large, complex vehicles.
Other than that, foot soldiers have sabotaged tanks in a variety of ways during the World Wars, and still do to this day with various weaponry. Tanks have always been, by nature, low in agility and in their ability to detect infantry before they can become a threat. The same was true of the tanks of yore: Knights. It's the nature of armour. While I'm sure modern tanks have all kinds of sensors to detect incoming infantry, the trouble is still dealing with infantry effectively once they arrive. Drones are a modern possibility for anti-infantry purposes; see C&C Generals. Mixing unit types is, in most games, the most effective deterrent to this paper/scissors/stone effect of one unit being weak against another.
As for squads, UT2004 shows how on average 3 skilled footsoldiers have a good chance at taking out a Goliath tank. Usually one or two of them will be killed beforehand, but that's the tradeoff for being able to destroy one of the game's more powerful weapons platforms. So I think you're on the right track.