The emperor of Austria is the president of the German confederation, and the only way for Prussia to change this situation is to go for a war.
In early 1850, Prussia tried to set up a "Union of Erfurt", which was a north-German confederation with (surprise, surprise) the king of Prussia as president. It was a rash initiative, which was predicated on Austria being still too busy in pacificating Hungary to be willing to open another front in Germany.
It did not work: the king of Prussia received an ultimatum to present himself at Ormutz, in Bohemia, on 29 November 1850. A treaty was signed, officially named as the Punctuation of Olmutz but known in Prussia as "the humiliation of Olmutz", by which Prussia accepted to disband the Union of Erfurt and recognized the emperor of Austria as president of the German confederation.
In a way, this humiliation was instrumental in pushing the Prussians to reform their army, although it took more than 10 years, and ultimately needed the bungled mobilization of 1859 to become really effective.
The 2nd Danish war was a field trial of this army reform, and the result was quite satisfactory.
At this stage Bismarck set in motion his strategy: ensure a French neutrality (which was not too hard considering that France at the time was involved in the Mexican adventure), strengthen the relations with Russia (again not difficult: Russo-Prussian relations had always been traditionally good, and the support that Prussia provided to Russia during the Polish insurrection of 1863. Not only Austria did not provide any support, but the relations between Austria and Prussia had soured when Austria failed to intervene on Russia's side during the war of Crimea) and set up a credible casus belli. The former Danish duchies worked perfectly, and Austria reacted exactly as Bismarck had planned, looking for another "punctuation of Olmutz".
The Danish king's idea of joining the German Confederation couldn't work: it is quite doubtful that the Danish parliament would have agreed, German nationalists would have gone on the war path and (most importantly) Bismarck wanted a war, and was not going to throw away this golden opportunity.
To change this situation, it is necessary to go back to 1850 (either Prussia does not try the Erfurt gambit or Austria is less firm in humiliating them publicly) or at least to 1854 (Austria intervenes in the war of Crimea, and her relations with Russia stay good: this however would open another can of worms, because France and Great Britain would certainly not be happy with the Austrian intervention).