The game combat mechanic is to target brigades. Brigades with several regiments in a Division are going to be targeted more than a "brigade" of just one battery in that Division. So an infantry brigade tacked on to an artillery Division gets annihilated and the individual artillery batteries are still not targeted.
If you have artillery batteries in a stack of several mixed Divisions, or have them loose in the stack or form one pure artillery Division, the guns are still affected by the same game rules. The advantage of replacing the guns of a mixed Division with infantry is that you get a third more infantry to take the hits in that Division. The advantage of an artillery Division over loose batteries in the stack is the CP savings. Additionally, pure artillery units were an historical part of the CW and the nineteenth century.
An artillery Division cannot attack alone, because at range zero the guns don't have an assault capacity. If you sent a stack of artillery batteries to take Manassas, nothing would happen. So when you attack with a stack that also has an artillery Division, everyone fires, but the artillery Division doesn't assault. The artillery would correctly remain behind the lines. However, if a mixed Division is routed during the assault round, then the artillery batteries in that routing Division probably take their share of any pursuit hits the mixed Division suffers.
I also had one instance where an artillery Division took about a dozen hits, probably from counter-battery fire. So this Division is not immune to taking hits.
If I have a single Division force package defending something important, then I use a mixed Division. The entrenched guns get an accuracy bonus and the Division with artillery saves on CPs. However, one size does not fit all. How to use the artillery to my best advantage, or the infantry or the cavalry, is a conscious decision. I don't want the game changed so that I must only eat soup with a fork.