1. The PzIII in 1942 was the "main tank program" The lines were building tanks for most of the year.
Yes. At the time, they were unable to churn out in similar numbers anything better. But keeping the production lines running meant that they could then build specialized vehicles, and in particular StuGs, on those lines, later.
2. The Stugs were there to compensate for the lack of tanks. Given the possibility of having enough tanks the need for stugs would be reduced to the infantary support role.
Sure! Only, you seem to believe that the "possibility" depends solely on design. It doesn't. Things like raw materials, production lines, man-hours and money also count.
For instance, StuGs were simpler, faster and cheaper to build and maintain than turreted tanks. So the "compensation" includes all sort of economies.
3. Nobody shuts down production lines in wartime. They switch production to more advanced types. The line building PzIII and for would phase out those models to build something a bit better.
Yes, StuGs and specialized vehicles on the same chassis. Of course you can also retool the lines to produce vehicles on an entirely new chassis, which, even if it's not a Panther, will be larger and heavier, thus requiring a retooling of the lines, as mentioned.
In short, if you stop producing Pz IIIs and vehicles based on that chassis, you won't have the historical German production; but you won't have, either, any other AFV in the same numbers for the same time frame.
On top of that, deciding that you want a "better tank" instead of a StuG III is easy; you'll just have to throw more raw materials and more man-hours at it. Thus, even when you have the lines up and running, for the same amount of resources that you input you'll get a smaller number of "better tanks" instead of those StuG IIIs.
This will happen regardless of the production choice:
a) you can continue producing the Pz IIIs and their chassis on the existing production lines
and at the same time build new production lines for the "better tank". This will give pz IIIs and StuGs as stopgaps in the meantime, but you'll also have you a long lead time as you set up the new production lines. Once you field the "better tank", you'll have less of those than of the IIIs and StuGs.
b) you can stop producing the IIIs and retool their lines. That still gives you a lead time while you retool, albeit shorter - but you also have no stopgap. Again, you'll be able to field less "better tanks" than the number of IIIs and StuGs you could have fielded.
c) you can do as per a) above, but once you have the "better tank" going, you also keep producing the StuGs. You still get the long lead time, and in the end, since you only have so much raw materials to go round, you still end with less vehicles, because the "better tank" still uses more of them.