A "sap" technically is part of an entrenchment. It's a short spur running off a trench. It may of may not have head cover. A sapper is the bloke with the spade who dug it. Mining is the act of digging a tunnel under a fortification in order to bring about its collapse. Hence "Sappers & Miners".
AndyG