There's also a skill that adds 50% damage to fighters. A capital ship with that, some of the aforementioned guns, and IPDAI really does just chew through fighters.
You can also use any large missile mounts you have in the fleet on Locusts. They clear out fighters pretty well and are useful general purpose flux free damage against other targets.
I will anchor off of this statement to highly suggest you to get yourself a Gryphon and just build it like a missile based enemy airforce obliterator.
Locust on the big missile mount, swarmers on the small ones, whatever you want on the two mediums (I find harpoons really good sicne they provide a lot of utility).
Full PD loadout on all the ballistic mounts, plus PDAI and of course ECCM package.
Rest goes into flux management, maybe even cram hardened shields if you feel like it.
I tried it once when I had to deal with an especially spammy carrier faction (Stormhawk Republic) and it did really well.
Edit: I actually have a gryphon stored in my home planet so I actually went ahead and fiddled with it: this is the vanilla Gryphon you can use for anti-fighter/anti-frigade purposes and it's quite good at it too:
Weapons: 1x Locust SRM Launcher, 2x Salamander MRM pod, 3 Swarmer SRM launcher, 1x Dual Flak, 5 Light Machineguns
Hullmods: ECCM package, Integrated Point Defence AI
Flux management: 20 capacitors, 15 vents
Optimal officer: Aggressive so it can get close and keep the pressure on small frigades. Just have it escort your vulnerable ships if you want to make sure it does not get into trouble and want it to focus on providing fighter coverage. The dual salamander MRM pods really help it nail frigades as they try retreating once the missiles start piling up flux and also have the added advantage of even turning bigger crafts around as they're immobilized, making it easier for the other missiles to chew at the target.
Other loadouts: You can really put whatever you want on the two medium missile slots as there really isn't a medium size anti-fighter missile weapon in the game. You could and I mean
could experiment with the Proximity Charge launcher (the Gryphon will actually turn sideways and aim them towards whever target you're firing at too!) but I only have one of those weapons so I can't really speak about its performance.
Harpoons are a great option when it fights in the frontlines, Sabots too. Just give it Pilums if you want it to hang back.
Let me know if you can get your hands on one and if this weapon loadout works for you!