What's the longest that Germany could have lasted in WW2 (after PH).

Speaking of purely technical terms, such as of resources, both material and human, as well as technological development, combined with the military tactics and resources available, Germany could have actually outfought the war as a winner in continental Europe.

Problems were more political and of leadership, rather than those mentioned above. A military leader, skiled in the art of war of the modern times, could have commited resources more skillfully to win the Eastern Front War, by pressing home the attack on the USSR, untill it was forced to surrender, rather than digging in at Leningrad and Stalingrad, which served no strategical purpose to begin with. By pressing home the attack on Moscow, where the Communist leadership still seated, including Stalin, forcing it to surrender after a siege, or blunt conquest, Soviet leadership would likely collapse, since Stalin already had done a great job in the 30's, by elliminating potential and fictionary rivals. Without a clear leadership, the USSR would degrade most likely in a state of civil war, simmilar as after the overthrow of the Tsar.

After the winning in the East the Western and Mediteranean borders could be strengthened against possible landings from the UK/USA, since the bulk of German forces originally was allocated to the East. These warexperienced troops and units would be difficult to combat, by the mostly inexperienced Western Armies, if they could land at all in the first place.

With more logical developments in the technological field, the Luftwaffe could have maintained controll over the own skies, rather than giving it away for the Allies. With more airforces available, as these were not needed in the East, the Allies would have faced more opposition in the air. New designs, such as the potential of the jetengine and rocket, could significantly moost the strength of the airforce. The war at sea could have been much more different as a result of this, as the new advanced Type XXI submarine would not be so heavily delayed as a result of the bombing of German industry.

On the long term, Germany could have prevailed as a winning power in Europe, even with the uninevitable loss of Japan in the Pacific war.
 
Top