Of course to beat the empire it not actually necessary to defeat the empire's military. It's a dictatorship with a single individual at the top. Kill or capture the federation's president and the federation goes on quite nicely, not a hiccup. Do the same to the empire and the whole thing comes to a halt. The republic is re-established and there is peace with the federation.
The federation would be assisted by the rebellion and whatever Jedi are alive at that time period.
The empire would not dare to throw it's entire military might against the federation because it has to maintain control over it's own people.
The federation has experience fighting clones during the dominion war and let's face it, compared to the jem'hadar the imperial storm troopers are pathetic.
Visual evidence suggest that imperial ftl travel is blind, starfleet would have the advantage of being able to attack in that realm without any counterattack. Even taking into account the imperial vessel obvious superior speed, starfleet comes out ahead.
Starfleet vessel's shields can not be penetrated with laser energy.