The AC/5 is an awkward middle ground in many ways - it does everything okay, but nothing well. It's not great at AA, anti-mech, anti-vehicle, or anything else. Specialty ammo ought to be what saves it, but even there it's no better than an LRM overall. The MegaMek campaign server I used to play on gave precision ammo to AC/2 and AC/5(but not AC/10 or AC/20), which at least made it playable as a 3025-era bug-squasher, but in any era where you can use precision ammo within canon it's still outclassed by other options. The only real sweet spot is playing with planetary environments that murder your heat sinks, I think. I could ramble over in Fan Rules about how to improve it(and I have), but that's not terribly relevant to canon play.
That said, the variant AC/5s are all much better. The LB-5X is decent at flak (though the LB-10X still out-classes it for IS play, because the designers messed around with the progressions of mass vs range vs damage between LB-X AC models), the Light AC/5 is pretty decent(especially since it keeps the specialty ammunition), and the RAC/5 is sort of like an IS HAG. The Ultra-5 isn't my favourite, but the stats aren't bad there either. All are reasonable and playable. But to make the stock AC/5 better, it'd need to have a gigantic amount of versatility, and the tabletop rules don't allow for that very well.
As headcanon, consider an AC/5 that doesn't need to carry its ammo in full-ton lots(or one of those crazy many-AC tanks with enough guns and ammo to pack all the specialty options). A bit of every sort of specialty ammo hanging out in your ammo bins lets you deal fairly effectively with infantry, ASF, bug mechs, and light battle armor, and still do okay against mechs and tanks. And it works well on hot planets too. That might justify it sticking around, even in SLDF days.