if you can't get out HC at the time, you could always get out LF's which is the hard counter against flak to tide you over until you get the big guns. You could also build a second or third capital. Flak barely do a thing on caps and HC. Even 30-40 barely scratches the paint. I am not kidding, a self repairing skarkovas can easily survive continued fire from dozens of flaks
The replay is now outdated, but I posted one not long ago where I killed my enemies with flak because I was tired of listening to people complain about it being useless. My ally got rushed and he bailed on me and left me with a 2v1, so I did some hit and runs for a while and finally culminated in a fight where I destroyed both enemy fleets, including HC's, 3 enemy capships, and a small starbase -- I used a big pack of flak with hoshikos backing them. Flak doesn't do a lot of damage to your focus target, but they are hard to remove from the field. Enough of them will kill even a capship. The thing they had a real problem with was starbases. LF's are the hard counter, but flak is so fricking tough, it actually holds its own ok.
BTW, I have tried this with Advent flak under a progen and guardian shield umbrella, and it worked well too. I have the most problem doing this with Vasari sentinels because it is hard to get adequate repair for them, though if you group them with a couple Skirantra's and some Overseer's, you could probably accomplish the same kind of abuse.