What if at some point no later than the congress of Vienna (tough probably better much earlier), the Habsburg get the bavarian crown and made Bavaria part of their empire? Like Hungary it would be an integral part of the empire but its own crown, tough in the ausgleich it would be a cisleithenian kingdom. So by the 19 century we will be looking at an Austrian empire like otl but with added Bavaria? Would the bavarian be more cooperative with the austrians than the rest of the empire? Would this tip the imperial balance in favor of Vienna? How would this affect long term the austrian empire and its problems?
Best OTL chance is Charles VI retains Bavaria at the end of the WoSS. The Bavarian Wittlesbachs get Sardinia as was initially intended.
They'd have to work very hard to get the Bavarians loyal as Leopold I allowed Bavaria to be pillaged to convince the elector to switch back to the Grand Alliance bloc. If not I'd imagine Bavaria would jump ship as it could be easily argued none of the Habsburg daughters had as much right to it as the extant now Sardinian Wittlesbachs.
On the other hand, Charles VI may be more open to Eugene's idea of strengthening the army as succession in Bavaria would be far more tenuous than the other Habsburg realms. I'd imagine Frederick of prussia + France would have a harder time encircling the House Habsburg in this scenario.
I don't think Bavaria would be completely subsumed into Austria, I probably would be equivalent to Bohemia rather than Hungary.
If all goes well, Austria should have a better power base to curtail the Hungarian nobility, in the sense that they don't need to rely on their finances as much. In event of a rebellion more power base for troops although I'd hope it wouldn't come to that/be avoided but given the autocratic tendencies of the era I wouldn't be surprised.