The Three Emperor's Alliance collapsed already before William II's ascension to the throne, because Austria and Russia had incompatible interests in the Balkans.
Germany would rationally probably best bet on friendship with Russia and Britain, since Russia and France were Britain's natural rivals, and AH was not an asset (in 1914, AH almost collapsed when Galicia fell to the Russians).
AH would most likely disintegrate anyway during the early 20th century. If Germany had played their cards right, they could have inherited Sudetenland and Austria, and had an alliance with Hungary, while Russia gets Galicia.