The problem is that the numbers must be wrong for things to make sense. The numbers as given don't make sense producing a result other than the Federation losing to the Klingons.
This is the point where time agents intervene to correct the timeline and frankly I don't feel that is a satisfying narrative.
Why? Wars arent won by ship statistics, but as much by strategy and logistics. You can have superior ships and still lose because your admirals fuck up, or your intelligence fucks up, or your logistics fucks up.
And its worth noting that we do currently have what looks like the single best ship class at the moment in the Excaliburs, with advantages that can be leveraged to strategic effect.
They just havent been concentrated yet.
For one potential scenario?
Im entirely expecting a couple of Excaliburs to use that 350 light year range and Warp 8.6 speed we designed into them for deepstrikes into the Klingon interior against military-industrial targets and supply lines.
Do to a couple Klingon shipyards and antimatter refineries, even docked ships, what the Romulans tried to do to our shipyards with their Warp 6 ships back during the Second Battle of Sol in 2160.
Important strategic targets had just gone from over a year away at warp to a few months. There was serious concern that the willingness of the Romulans to engage scouting starships meant that a reserve of these new ships had already been assembled behind enemy lines and was ready for deployment. This fear was confirmed at the Second Battle of Sol in April of 2160, when the Thunderchild-class Warspite and a half-dozen Skate-class frigates were forced to launch without their torpedo payloads from the San Francisco fleetyards to assist a pair of Tellarite cruisers with engaging a trio of the new Romulan Birds of Prey, during which the under-construction NX Burya was torpedoed in dock and many of the orbital manufacturing facilities likewise destroyed. While one of the Romulan attackers was disabled and subsequently self-destructed, the other two disengaged at Warp 6 and fled the system. Nowhere was safe.
Send a trio of Excaliburs off to pay the Q'nos shipyards a visit and you cut away a good chunk of ship production while forcing ship redeployments to honor the threat.
And thats just one potential option.
There's all sorts of other options, from Klingon admiralty going for a knockout punch and YOLOing into a nexus of system fortifications and other defenses, to their literally running afoul of astrographic phenomena because they have bad maps of the Federation interior.