The idea of Austria being part of Germany had first come about when Germany was becoming unified as a nation-state in the mid 1800s. If history had turned out differently, Austria would have unified Germany and Prussia would have been excluded.
This statement is partially correct, but needs greater precision.
In the first place, before 1804 there was no sovereign state that was officially called "Austria". The only territory bearing that name was the Archduchy of Austria, consisting of the two provinces of Upper and Lower Austria. This was the first territory acquired by the Habsburg Dynasty way back in the 13th Century, and as other territories were acquired by that dynasty the term "Austria" came to be unofficially applied to them also. However, all the various territories acquired by the Habsburg rulers remained separate entities, united only in the person of those rulers, who were Archdukes of Austria, Kings of Bohemia, Kings of Hungary, Dukes of Carinthia, Styria,Carniola, Auschwitz, etc.
All the Habsburg territories, excluding the Kingdom of Hungary acquired in 1527 (and extended at the end of the 17th Century) and the Polish territories acquired in 1772, had been part of the Holy Roman Empire since the medieval period, and hence part of a German state, albeit rather tenuously. In 1804, the ruler of the hereditary Habsburg domains, who was also the Holy Roman Emperor Francis II, fearing the imminent dissolution of the Holy Roman Empire in 1806 by Napoleon, declared his various dynastic domains to constitute a single political entity, called the Austrian Empire, and proclaimed himself the Austrian Emperor. This was the first time that a sovereign state officially called "Austria" had existed.
In 1806 Napoleon abolished the Holy Roman Empire, and replaced it with the Confederation of the Rhine, from which both Prussia and Austria were excluded. Thus, for the first time the Habsburg domains, now called the Austrian Empire, ceased to be part of a German State.
In 1815, the German Confederation was established, with the Habsburg territories that had been part of the Holy Roman Empire being included in it. Thus part of the Austrian Empire was once again included in a German political entity, while parts of it were outside that entity, namely the Kingdom of Hungary (which included Croatia, Voivodina and Transylvania), the Kingdom of Galicia and Lodomeria (annexed from Poland in 1772), the Duchy of Bukovina (annexed from the Ottoman Empire in 1775), and the Kingdom of Dalmatia. That was not a unique situation, since parts of the Kingdom of Prussia were also outside the German Confederation, namely East and West Prussia and the Posen Province, areas with a large ethnic Polish population.
Although the Austrian Empire held the presidency of the German Confederation, that entity did not have an official Head of State, and the Austrian Empire was constitutionally just one of the member states, with no special rights. Nevertheless, there was a tendency for non-Germans to regard the Austrian Emperor as the de facto ruler of Germany, eg Moses Hess habitually referred to "Germany" and the "German Emperor" in his polemical writings about the war between France and Austria in Italy in 1859. That shows that contemporary observers considered Austria to be one of the German states, just like Prussia or Bavaria.
The Austrian Empire ceased definitively to be part of a German State in 1866, after its defeat by Prussia, when the German Confederation was officially abolished and replace by the North German Confederation, consisting of Prussia and the other German states north of the Main. There had been an intention to create a similar South German Confederation, consisting of Baden, Wuerttemberg, Bavaria, and the parts of the Austrian Empire that had been part of the German Confederation, but the proposal was dropped due to French opposition, and the South German states all became formally independent.
In 1867 the Kingdom of Hungary was separated from the Austrian Empire and made was impossible for the Austrian Empie an autonomous entity with its own parliament, connected to the Empire only in the person of the Habsburg monarch, who was also the King of Hungary.
It was impossible for the Austrian Empire to create a united Germany because so much of its territory was not German in population, even after the excision of Hungary and its dependent territories. The only way the ethnically German parts of the Austrian Empire could have become incorporated into a German state would have been if the Empire had disintegrated, and Bismarck did not want that as the non-German parts, Bohemia-Moravia and Galicia, would have gravitated toward Russia, encircling Germany.