Douglas Harper's Etymology Dictionary
fox-hole
also foxhole, Old English fox-hol "a fox's den," from fox (n.) + hole (n.). Military sense of "slit trench" is from late in World War I (1918).\n\nThe term "fox-hole" is used by the German soldier, as determined from the examination Of large numbers of prisoners, to describe a hole in the ground sufficient to give shelter from splinters and perhaps from the weather also, to one or two soldiers.
[U.S. First Army summary report, Oct. 31, 1918]