Bavaria inherits Baden in 1819.
In 1820 OTL Wurrtemburg pushed for a free-trade bloc of the "Third German" states (that is to say - excluding Austria and Prussia). Historically Baden supported free trade whereas Bavaria, with its less developed economy, supported protectionism in the negotiations. Here, due to controlling Baden, Bavaria takes the pro-trade side of things and Bavaria-Baden, Wurrtemburg, Hesse-Darmstadt, and Hesse-Kassel form a common trade bloc.
Over time Nassau, Saxony, the Thuringian States, Hanover, and other Third German states join the trade bloc. Come 1848, the Rhineland rebels, the Bavarian King is offered the Crown by the Frankfurt Parliament, and all of Germany west of the Elbe is united.
----------
After the Napoleonic Wars the Polish-Saxon plan results in the establishment of a Wetting Kingdom of the Rhine comprised of the OTL Prussian Rhine Province. Given how the Congress wanted there to be a watchdog state east of France, I think it would get the Grand Duchy of Luxembourg (Netherlands here getting Orange-Nassau as an exclave perhaps?). If that isn't enough, perhaps the western portion of the Kingdom of Hanover would be Rhenish as well here. Anyways, Rhineland is a powerful enough state here to unify a large portion of Germany (possibly with French backing as a way of spiting Prussia and Austria).
----------
King William of the Netherlands gets his Rhenish border and Westphalia is made part of Hanover here. Prussia gets Saxony, Saxony gets Poland, and Russia gets screwed (okay okay maybe the right to annex Moldavia). Hanover proclaims itself here as the
Kingdom of Saxony rather than the Kingdom of Hanover due there not being any other Kingdom of Saxony TTL and "Saxony" comprising lands pretty consistent with the historic Duchy of Saxony. With Saxony proceeds to establish a common trade bloc among the Rhenish states and eventually unite all of Germany between the Elbe and Rhine.
-----------
In 1848 the Prussian Rhineland and Rhenish states form a Federal Kingdom of the Rhine separate from the more reactionary states. Later on, with French support, it unites much of Germany into a Kingdom of Germany.