It really sounds like you have little respect (albeit justified) for Karl VI. But at the end of the day, whether or not Austria keeps Bavaria will depend on Karl VI actually having male children. After all Josef at the time already has a STD, and has given it to his wife, which means no matter how it's swung, either Karl becomes Emperor, or a non-Habsburg inherits everything.
That obvious? Yeah Karl VI is my least favorite Habsburg ruler and I've long said that the only good thing to come from him was Maria Theresa. That said, I disagree with your statement on male children. There are several scenarios that would allow the Austrians to keep Bavaria, with or without male heirs. The first would be to have Josef annex Lower Bavaria in 1707, the same time he awarded Upper Bavaria to his uncle the Elector Palatine. Karl VI is unlikely to de-annex Bavaria after its been added to the Monarchy. After that the succession could still pass to Maria Theresa like OTL. The second idea would be to have Empress Wilhelmine die in 1711 instead of Josef I, giving him the chance to re-marry and father male heirs.
Now I'm well aware of the STD controversy, but personally I question whether or not that's what made Wilhelmine sterile. Here's the TL: Josef and Wilhelmine married in early 1699, having children in late '99, 1700 and 1701. Then Wilhelmine gets the STD from Josef in 1704. That doesn't account for 1702 and 1703. Before the Empress had a pregnancy a year but there's no stillbirths or miscarriages between '01 and '04, so its just as likely that some kind of complications from Maria Amalia's birth could have left Wilhelmine unable to have further children; the STD would just be terrible icing on the awful cake. As there's no way to prove which theory is right, either could be what happened. So even with whatever STD Josef had, he could still father children with a second wife and not infect her/render her sterile.
Back to the discussion though, annexing Bavaria would be a huge boost to Austria's status as a Great power. The Bavarians had one of the largest armies in the Empire, so that's added to the Habsburg Monarchy. The Duchy's wealth, fortresses, influence and resources are all added to the Habsburgs. It also sets the precedent for further deposition of Princes and annexation of Imperial states that side against the Emperor. It would be highly controversial and unpopular but, at least initially, there would be no one around to fully oppose it in 1707/1714. All the players are either exhausted or caught up in the Great Northern war/Spanish Succession war and would have no troops to spare. Plus as I said above, no one's going to go to war to protect Bavaria at this point in time. The ones who would object, like Saxony, Hanover and Prussia, would be opposed to the precedent set, not the annexation itself.
Ignoring the Josef angle for the time being, it would be fascinating to see what the Austrian succession war would look like down the road or hell just Karl VI's reign in general. Who does Maria Amalia marry if the Bavarians are gone? Perhaps her great-uncle Elector Karl III Phillip of the Palatinate? Its not like the Habsburgs hadn't married uncles to nieces before, this would simply add another generation between them. Assuming that Maria Josefa still marries Friedrich Augustus of Saxony, would the Wettins make a play for the Habsburg inheritance, playing Bavaria's role? Personally I can't see that happening if the Saxons still hold the Polish throne. The very idea of a Polish-Saxon-Austro-Bohemian union would be downright terrifying to the Great powers (though it does sound pretty epic to me!). I suppose we could see Maria Josefa try to secure parts of the inheritance for her second and third sons, but that would be it. On the flip side, if they don't hold Poland, its equally likely that a Habsburg ally is ruling in Warsaw, potentially bringing Polish support to the Austrians in the Succession war.
Something else to consider: the Wittelsbachs go from having three electoral votes to one as they're losing Bavaria and Cologne (not sure how an Ecclesiastical Prince is deposed exactly but be sure that Josef Clemens won't remain Archbishop). This weakens the family alliance against the Habsburgs that developed during Karl VI's reign. If the Habsburg-Palatinate marriage happens it would be further weakened, especially if Amalia gives her husband male heirs, saving the senior Wittelsbach line. Without the Bavarians to dispute the Habsburg inheritance or the Imperial throne, Maria Theresa would be in a much stronger position in the war. Francois Stephan's likely elected much earlier, either in 1742 (same time as OTL Karl VII) or perhaps 1741 of the OTL extended interregnum can be avoided here.
In all, Prussia's in a bad spot here. With no Bavarian troops to distract her, Maria Theresa is free to focus her army to reclaiming Silesia. If the French still invade then they're backing Friedrich's land grab, not one candidate in a disputed succession. They also have a harder time getting to the Habsburg lands sense they have no ally on the Franco-Imperial border, forcing them to fight in Bavaria as well as Austria and Bohemia. Hell the French might focus their energies on the Austrian Netherlands much earlier and send only token forces to aid the Prussians. Prussia still has one of the best armies on the continent, but if Austria is able to harness the eastern allies that developed during the later Seven years' war, then we could see the Prussians completely collapse like the TTL Bavarians. Really this could make a fantastic TL if anyone's interested!