I thought you only got stacking penalty if the frontage was too low for the amount of combat units? The idea I had was basically building heaps of stacks I could effectively use without penalty because most of it is artillery or whatever.
No. Frontage determines how many units can fight. If the frontage is too low, your excess units can't fight and will wait in the reserve until space is available. That's why you want to attack from several provinces, because you receive 10 frontage + 5 frontage per additional attack angle.
Stacking penalty does always apply and is calculated by adding up all brigades in combat AND reserve and substract the bonus from tech and theatre HQ.
Example for frontage:
If you have 5 INF/INF/INF/ART divisions (3 frontage each) and attack from one province (10 frontage available), only 4 of them can fight. 3 divisions fit perfectly (3*3=9), the last one is allowed to squeeze in the remaining frontage and fight (with no additional penalty), its actual width is unimportant. So you end up with 12/10 frontage.
In theory you could even use a frontage 6 ARM/ARM/MOT/MOT division to fill the last "1" space of frontage, but remember that you can roll encirclement events that increase the frontage by +5 for several days - that would go to waste with a 6-frontage division as final filler.
If your army would consist of INF/INF/ART/ART (2 frontage each), all five divisions could fight in a frontage 10 battle. So the difference between 3-frontage and 2-frontage divisions isn't that great when attacking from a single province.
But if you attack from two provinces, you will have 15 frontage (10 base + 5 from another attack angle), so you can either have 5 INF/INF/INF/ART divisions, or 8 INF/INF/ART/ART divisions - the benefit from low-frontage divisions is quite significant.
And keep in mind that it is NOT important from where your units are attacking. The attack from the second province increases frontage by 5, but the units in your first province can be used to fill that frontage. So if you have 7 INF/INF/ART/ART in one province and 1 INF/INF/ART/ART the other province, all units are allowed to fight: 7*2 + 1*2 = 16/15 total frontage. You can even use cheesy stuff like HQs to attack from other provinces to increase the frontage, even though these units cannot participate in combat (0 frontage).