For starters, I'd like to say that the very name of the thing we're talking about should give a pointer at its origins and the purposes it was initially intended for. Though it is certainly true that armored vehicles with casemate-mounted guns were less vulnerable in the defense rather than in the offense, it is naïve to ignore the fact that they are still called, well, _assault_ guns.
The assault gun was initially meant not as a replacement for tanks, nor as a tank destroyer (though many tank destroyers later would feature a casemate mount for their gun). It was a piece of _armored self-propelled artillery_, only conceived to support the infantry in the assaults. True armored self-propelled artillery are howitzers firing indirect, on a curved trajectory; they are self-propelled to avoid the set up, unlimber and limber times of a towed howitzer; they are tracked to improve off-road mobility over a truck towing the howitzer; and their armor is minimal, its main purpose being protecting the crewmen from a riposte in kind: artillery fragments delivered by indirect fire.
The assault gun, OTOH, was armored self-propelled artillery but: it was meant to fire direct, engaging from relatively close distance its target; and its armor was thicker (and normally featured a top enclosure, unlike most SPA), exactly because it was going to face direct-firing gunnery.
The reason why the Germans, the inventors of this piece of equipment, needed assault guns was simple: they had too few tanks that could support the infantry with a sizable enough HE round. In 1939-1940, a French bunker with a small ATG and a MG would be enough to stop both German infantry and any Pz I, Pz II or Pz III. The Germans had the Pz IV, which was exactly born as a tank capable of carrying a 75mm, but there were too few of those, and were needed to provide that kind of support to armor-only formations. Therefore, here comes the StuG III, built on the Pz III chassis, with exactly the same 75mm in a casemate mount. Given its task, a turret would have been an extravagant expense; bunkers do not move, so a restricted field of fire is OK. StuG, obviously, means Sturmgeschutz – "assault gun".
Could a StuG equip whole armor formations? Yes, absolutely, considering that this is exactly what happened in RL, in OTL. Not up to divisional level, but the armored battalion in German armored infantry divisions (Panzergrenadier) from mid 1943 on was officially equipped with StuGs. Plenty of panzer battalions in Panzerdivisionen, too, though officially allotted with tanks, had whatever was available from late 1943 on: StuGs, or tank destroyers.
Why didn't the Germans stop, or never begin, building Panthers and Tigers, and concentrate on assault guns? Plenty of reasons. Some are those already listed, that is, they wanted armored vehicles more capable of offensive operations, capable of taking out targets to their flanks.
But there are others. One is a matter of protection, i.e., armor. Late StuG versions were already as up-armored as possible with the engine these vehicles could contain, and they still were much thinner than the front armor of a Panther or Tiger.
Another is a matter of size. Yes, the Germans did mount longer (and therefore heavier and bulkier) 75mm guns on the StuGs, and then 105mm howitzers, and even 150mm ones. But as the weight went up, the transmission, engine and train became more and more overloaded. Additionally, with the caliber going up, the size and weight of the individual round also went up, which meant less and less could be carried. The StuH 42 carried just 36 105mm rounds (likewise, consider that a Pz IV H would carry 87 75mm rounds, while the corresponding gun mounted in a StuG III G would have only 54 rounds). The same problems would have plagued a StuG carrying a 75mm/70 gun or, even worse, an 88mm gun.
Size also affected another aspect. The StuGs all had a crew of four. One of the reasons of German tank warfare superiority always was the fact that their tank commanders could concentrate on doing that, commanding. They had all the time for situational awareness and taking tactical decisions. That was a great edge over overworked French or Soviet tank commanders. But a StuG commander would not have that advantage.
Generally speaking, anyway, one should not assume that if a combatant chose something, it was because he was convinced that it was the best choice possible. More often than not, production problems affected the decision. The lines producing the Pz III chassis were up and running, and building Panther and Tigers was extremely costly. The lines producing the Pz 38 chassis also were available, and though that tank itself was no longer very useful, using the chassis for the Hetzer was a clever way of exploiting those lines. Things like those were happening on both sides of the hill.