I like Redbeard's POD, which opens the way to a completely different endgame of the Napoleonic wars.
The problem is that in such a scenario Prussia will be even more strongly aligned to Russia, while Bavaria would be under the Austrian influence. The issues of the Palatinate and of Saxony are not going away: IOTL the Palatinate was given to Prussia with the aim to contain any future expansionistic ambition of France; who is going to get it ITTL? I would believe it to be too much to award to Bavaria, so it might end up in Prussian hands again by lack of suitable alternatives (it might be given to Austria, but in such a case the Austrian Netherlands would not change hands and the focus of Austrian strategy would be much more on Germany).
Otherwise the best chance to keep an independent Bavaria, Baden and Wurttenberg is to avoid the Franco-German war of 1870, which is not an easy thing to do (there was a war scare every year from 1867 to 1870): maybe the best way is to have the health of Louis Napoleon get worse quicker. If the emperor is confined to bed and there is a council of regency the likelihood of a war decreases a lot.
In this scenario, there might be again talks of a Southern German Confederation, which would be anyway much looser than the North German one. Anti-Prussian sentiment was still pretty strong in southern Germany, so Bavaria etc. might keep their independence even if they would still be tied to the NGC by a defence treaty and there would be growing economical ties with the more developed northern states. The problem here is that Bavaria does not have a lot of money, Austria cannot afford substantial investments and the only place which might provide loans is France.
Another possibility is for the war to come on schedule, but this time Sedan is avoided and the war ends sometimes in the autumn of 1870 like Bismarck wanted. The peace treaty is much more lenient, and does not requires land sacrifices. The Bonapartist regime totters on, and can end up either in the emperor hanging to power and passing the crown to his son or the regime being toppled in the 1870s and a new regime being set up (either a monarchy or more likely a republic). Bavaria etc. keep their independence as above.
I do not see many chances to Balkanize Germany after WW1 (the sentiment of belonging to Germany is strong after 50 years of empire, and the Entente does not have the political will to force the split up of Germany), and even less after WW2 (a divided Germany would not help much if the URSS invades, and the occupation cannot last forever).