You need roughly equal numbers or firepower to defend a structure. Or just some hard counter to their doctrine, that might work with inferior numbers.
The structure will warp disrupt anyone who attacks it for a minute. In low sec, this allows interesting opportunities for the defenders if they have combat probes (which they probably won’t).
You also have access to ECM. These are very strong and long range. Unless the attackers have 7 or more cap chain capable ships, you can pretty much guarantee they won’t have a functional cap chain. Even if they brought that many, you can still annoy their logi. If you killed their logi but for some reason still didn’t win, you can focus on frigates and ships like blackbirds. Frigates that have no target lock can’t deal with a defender’s fleet’s fast ships, so you can sig tank better. Jamming a structure instead of a ship is pointless, so if you can break an ECM ship’s lock, that works too. If you’re in a griffin and have no logi to jam, usually you wouldn’t go for an ECM ship, but at whatever is shooting at the thing you’re trying to protect, but in the structure’s case, jamming something with high damage and low traversal isn’t going to do much. I never manned a structure, but I’ve been in structure fights and the ECM seems to basically be stronger versions of ship ECM.
Most obviously, you have strandup missile launchers and energy neutralizers. These can be used to attack. Against a properly coordinated fleet, these won’t do anything by themselves, but they can help you by adding DPS. Beware the enemy can just warp off if primaried by the structure. If you have the fitting for 3 Standup Anticapital Missile launchers fit them. If you are in roughly equal numbers and the enemy tries to escalate, these can wreck a FAX if you have some way to hold it in place. In large fights, sometimes both sides are capable of escalating, but they will not use that option for whatever reason. If you have anti-cap weapons, this makes escalating very pricy.
With these tools in place, you can expect to beat fleets of comparable size as yours. However if they bring 100 Hurricane Fleet Issues plus a logi and EWAR wing and you can only field 70 ships, you’re going to have a bad day.
Against sniper ships, your best tool of the structure, ECM, is not in optimal range. Long range weaponry is very CPU intensive and if its artillery its a PG hog too, so these ships tend to have poor tank if they even bother with shield extenders or armor plates. If you can land brawlers at point blank range you’ll do more DPS, but if they can control your movement, the structure just sits there. As a consolation, since you know they are going to use snipers, you can plan your defense fleet around it.