Would depend on the situation I suppose. Given the German tactic of 'Blitzkrieg' the supporting elements of the attack would not be far behind, and, should everthing go according to plan, the enemy forces would be in some form of retreat, spread out, or otherwise is draught from the speed of the attack.
This in mind, said sturmkompanie wouldn't have to defend for very long. Since an effect offense would require mommentum and defending immediately after an attack looses mommentum.
However, that would be reffering to the early years of the war. Later in the war, with the introduction of an East front and the major allied forces on the western front, it may be more probable that you would see any German unit defending shortly after an attack, as they would want to consolidate their gains as well as bring up support, which at the time (late war) was not in the best of shape, given logistics moral, allied air superiority etc.