This is one of my favorite topics right now! And one that I've done a fair amount of research for due to my (sadly abandoned) TL Appolinis et Diane and my Thirty Years war Habsburg victory TL that's in development. Basically the best opportunities for a Habsburg centralized HRE would be a Catholic victory in the Thirty Years' war or some kind of POD in the first half of the 18th century, the Austrian succession or Seven years' war being the absolute latest.
The first and best option is obviously a Habsburg victory in the Thirty years' war. For a significant part of the war the Imperialists were continuously victorious in campaign after campaign and by 1630 had more or less crushed all opposition within the Empire. The Emperor would be in the perfect position to restart the Imperial reforms of the previous century, like creating a common government, common taxes, a single law code, a standing army and navy, expanded law courts, ex ex.
It wouldn't happen overnight and there would be opposition but no Prince is in a position to revolt; the Saxons and Brandenburgians maybe, but neither really did much to directly oppose the Emperor OTL, more creating Leagues to keep the Habsburgs at the negotiating table. While the Empire obviously wouldn't end up with French-style centralization, I think a federated monarchy with the Emperor as an undisputed Sovereign is likely. I don't want to go into too much detail because I'm currently writing a TL on this subject, but its very possible.
The second option would involve a more natural evolution of the Empire, something that was slowly happening during roughly the first half of the 18th century. To get this one to happen you have to destroy any German rival to the Habsburgs. From what I can tell the best bet would be a longer-lived Josef I. He was basically the Austrian Sun King and in his short reign seemed to be aiming to create a German state. One of his actions was the apparent partition of Bavaria between Austria and the Palatinate. Now there's no direct evidence to support my theory but it certainly says a lot that he gave Upper Bavaria directly to the Elector Palatine and left Lower Bavaria sequestered under Imperial occupation. If Josef lived and indeed annexed Bavaria to the Habsburg Monarchy, then it basically doubles the Dynasty's power, influence and territory in the Empire and significantly weakens potential rivals, specifically the Wittelsbachs. It also gives the Emperor a new, or rather very old weapon: the deposition of Princes/nobles who go to war against the Monarchy.
Going with this would be either the early death of Friedrich the Great or even better have Friedrich still make a play for Silesia and get Prussia's ass kicked. That destroys the last internal rival to the Habsburg dynasty. However, a carrot/incentive has to go along with the Imperial stick, so loyal Princes should be given territories from the Pro-French states. Make sure the various Princes still see the Habsburgs as the guaranteers of their privileges, not the that Friedrich managed to present them as. In this case, I'm seeing something similar to the German Empire of the nineteenth century, only with the Habsburgs playing the role of the Hohenzollerns.