I was reading Keegan' s history of WW1, and he argues that generals were not quite as privileged or elitist as other histories argue as there were many generals who became casualties in the Great War. At the same time, he acknowledges that generals were not at the front lines as their headquarters were positioned at telephone wire connections, far from the front. So how did these generals die if they were so far from the front? Were there too many front line inspections?
Bloody Red Tabs: General Officer Casualties of the Great War 1914-1918 by Davies and Maddocks is pertinent here, dealing with those 232 British officers of Brigadier-General or above who became casualties.
While their headquarters would have been situated far from the front, general officers were still exposed to danger and not just when inspecting the front lines.
78 general officers were killed. 34 of those were by shellfire. 22 by small arms, and 12 of those by sniper fire specifically. For 15, the direct cause is not known but is thought to be shellfire or small arms. 3 drowned. 1 died in a flying accident. 1 of accidental injuries.
From the accounts given in the book, some officers were either brave or foolhardy, and exposed themselves unnecessarily. This was especially a factor for those killed by snipers. A few were merely unlucky. Deaths by shellfire were more of a lottery.
Some 1200 general officers served, so if at least 232 were casualties, that results in a casualty rate far in excess of the common soldier, but still falling well short of that reached by junior officers.