I think the main problem is that Prussia is a far better contender. Not only was Prussia's population three times that of Bavaria, Prussia had a demonstrably greater commitment to warding off the French—which was of course the dream of every German nationalist (think Die Wacht am Rhein). Prussia and Austria had been the great enemies of the hated French invaders in the Napoleonic Wars, and in that respect Austria had the advantage of being France's great enemy in the various post-Vienna pre-1866 wars while Prussia had the advantages of the kudos of Waterloo, of being the most powerful country that could indisputably be called German (Austria containing plenty of non-Germans) and of being well-positioned on the Rhine to deter the French. Bavaria, in contrast, had collaborated with Bonaparte and weaselled out fairly late in the game in order to escape the retribution of his enemies. Worse even than that, Bavaria had been among the main forces arguing against German centralisation at Vienna, and was to a great extent to blame for the German Confederation being a useless waste of time. The Bavarians really weren't very interested in German nationalism, despite the deterministic narratives of the inevitable power of nationalism; indeed, in the Franco-Prussian War, Bavarian peasants burnt their crops so that the enemy couldn't use them… the enemy being the Prussians from North Germany, not the French. France and, more importantly, also Austria (I wouldn't trust the assessment of Napoleon III's French government on its own) believed that there was a significant possibility that if there was great French success then the Bavarian people would be happy to be on the French side against the Prussians. Even after the Franco-Prussian War, the Prussians perceived a risk of this; that's a great part of the reason why they annexed Alsace-Lorraine: so that they could station their troops on the French border in a place outside South Germany, since putting the troops in South Germany would dangerously antagonise them.
There were good reasons why it was the King of Prussia, not the King of Bavaria, who was offered the German crown by the revolutionaries. With retrospect it's exceedingly predictable that he would have declined it for exactly the same reason why the Bourbons lost Spanish America (an on-principle refusal to align themselves with anything liberal and radical) but there were good reasons why he was offered it.
Consequently, I would argue that if Bavaria is going to succeed in uniting a Germany that excludes Prussia (and Germany must exclude Prussia or else it couldn't possibly be Bavarian-dominated) not only does Bavaria's character have to be rather changed, Prussia has to be uninterested in forming Germany—I should add, not just uninterested but actively opposed to the prospect, or else Prussia would cynically jump on the German nationalist bandwagon for the sake of increasing its power (I'm looking at you, Otto).
As for how to accomplish that… perhaps the Prussians clash more fiercely with liberal German nationalists in 1848, and Wilhelm I gets some ideas in that respect? Bismarck's power-base was on some dodgy constitutional claims that allowed the King of Prussia to ignore the Prussian Landtag (think sort-of parliament, but about as democratic as the 1800 British Parliament, which is to say, not very at all) and act with complete executive authority when the Landtag and the King disagreed too strongly to work together, and then on being close to the King and getting him to do what Bismarck wanted him to do. But Wilhelm I was an eccentric man who had strange, bizarre moods at times that it took Bismarck to restrain IOTL, and it's quite possible that if Wilhelm had firmly resolved on something contrary to Bismarck's wishes at a time before Bismarck had become essential enough to possess what IOTL was his greatest weapon over Wilhelm I—the threat of resigning and leaving him to deal with all the political mess on his own—Bismarck would have been unable to restrain him.
The biggest challenge, I would think, is how you make it not just not-Prussia but specifically Bavaria that unifies Germany, because if it's not Prussia then it's very likely to be Austria instead…