Just because Pomerania and Prussia are semi-independent as Hanseatic Republics, doesn't mean they're lost to Germany. No way the naval-orientated government wouldn't have kept the Baltic at all costs. The German navy and the strong influence of the Hansa in those lands, coupled with the importance of ensuring Germany dominated the Baltic, meant that when Germany did lose Prussia to the Poles, the Hanseatic coup in the major cities of Koenigsberg, Danzig, and Elbing during one of the Polish Civil Wars saw it returned (with greater autonomy) to the Kaiser.
And when Germany lost Pomerania to Sweden, the Navy blockaded the entire North Sea. By the time the Swedes got to Hamburg and Berlin, the blockade ruined their supply situation so much that Sweden had to retreat when faced by the admittedly ill-trained German Army. It took a long time for Sweden to admit defeat, and the Kaiser lost the First and Second Battle of Rostock, but the Third saw Sweden finally falter and surrender. The Swedish Navy was ruined, and Gotland let Germany keep the Swedes bottled up for the rest of history.
The strong navy and the merchant ties with the Empire were also what allowed Germany to control the Baltic; could Germany have taken Riga, Reval, Memel, and St. Petersburg without it? I think not. It was the navy and the merchants which let Germany truly incorporate the Baltics into the nation. Hell, I think that the area wouldn't even be German! Without a strong navy to connect the Baltic properly to mainland Germany, it wouldn't have been such an attractive destination for the German surplus population.
Keeping Southern Germany from joining with Austria would have been ideal, but after the Protestant/Catholic conflict ended the short dynasty of Austrian Kaisers, there's no way they would be content to stay in the Empire anyway. Too much animosity for the Protestant dominated Empire to have a substantial number of Catholic States, one of which who had their Emperor deposed.