A counter to heavy cruisers are the carriers. If the AI have nothing but HCs, crank out a bunch of carriers with bombers and support cruisers to go with them.
Ex: Drone Host w/ Guardians, Carrier with Hoshiko, etc.
If you've got a capital that's got bonus to strike craft effectiveness, all the more power to you.
Also, trying to max out the tech tree is a BAD idea. You'd loose if you try to do that, so don't EVER try maxing out your research as the first thing. What will win the game for you, is research only the minimal amount of things you need to win the game. That is culture, ships you're using (and/or appropriate counters), and upgrades that'll go with those. Spend every other bit of resource and cash into increasing your fleet.