First: what are the "German speaking parts of Austria"? Is this OTL Austrian Federal Republic? What about Burgenland, a part of Hungary back then? what about the Sudetenland? South Tyrol? Vorderösterreich?
Why would they give up Austria? That's like the British giving up England in exchange for Ireland, the Habsburgs came from Austria, were German speakers and had their eyes on German domination for the better part of a millennium.
I'm pretty sure that the Habsburgs would rather give up Hungary and the rest of the empire than give up Austria
To be honest, truly asb, also in the wrong Forum.
I agree with everything besides it being ASB. After 1800, it's ASB. Before that, strange land swaps occured without anybody listening to the population. AFAIK, that Wittelsbach prince actually was in favour of giving away his ancestral homeland Bavaria against the Austrian Netherlands.
Thus, strange land swaps could happen in the Congresses of the 18th century.
However, to have the Hapsburgs agree to a land swap of such an extent, you'd need a major war that leaves large parts of Europe up for the grab, the Hapsburgs loosing badly, probably driven out of their homelands, but still surviving strong somewhere else.
In all likelyhood, the Hapsburgs will not accept a swap against merely two provinces of Poland, with a sizeable Protestant population, isolated from all other Hapsburgs possessions. For such a swap to even be considered, you'd have to give them Poland. Absolutist Poland, to be more specific. After a major war and Austria being occupied.
I'd love to read that timeline - but I guess you'd need a rather early POD...