You could have better relations between the USSR and Germany early on to make this happen. This would allow for them to set up good trade agreements with each other (For example: Germany did have industry but needed raw resources, while the Soviets were the ones who had raw resources but desperately needed industrial goods for development), as well as help to secure their geopolitical position in Eastern Europe. If the Soviets can go as far as perhaps returning some of Germany's territory, such as the Polish Corridor, and call for a reduction of harsh terms, then it may also improve the image of the KPD, and while it might not be enough to turn Germany completely communist, it would most likely prevent the Nazis from taking power.
And if they do cause WW2 and ally, it will be much more than just Poland they'd take.