The photo above shows one of the bunkers just across the frontier inside Switzerland, from which the Swiss army kept watch on the opposing forces.
The following image is another view of the bunker shown above but from the opposite side, with a trench approaching it. These bunkers were built from wood and earth, as they were not expected to come under direct attack, but were for protection from the occasional bullet fired in the wrong direction. The bunker was marked with the Swiss flag to ensure that it was not fired upon by French or German soldiers who were unfamiliar with the lay of the land – as both sides would occasionally fire on each other. Relations between the Swiss and the troops across the border seem to have been good.
Alsace, the region stretching roughly 100 miles north from this part of the Swiss frontier, had been absorbed into the German Empire in 1871 after the Franco-Prussian War. Therefore in 1914 the French were determined to recover this territory. In the first month of the First World War, the French army managed to advance until they captured the city of Mulhouse (about 20 miles/32 km north-east from this part of the Swiss frontier), but were swiftly forced back by a German counter-attack, and the front lines then stabilised, with the French retaining control of the village of Pfetterhouse. On the German side, Moos was the nearest village. The two sides faced each other from either side of the valley of the Largue river. As on the rest of the Western Front, a system of trenches grew up behind the front lines.
After 1914, there was no longer any heavy fighting next to the Swiss frontier, but the vicious battles in the Vosges mountains took place some 30 miles/50 km to the north. The map below (published in the Swiss magazine "Mars" in July 1915 and annotated by me - click on it to see larger image) gives some idea of the terrain as you go north from Switzerland at this point.
There is a good account of this incident here.
The Vosges Front (www.front-vosges-14-18.eu). In English, French and German language.
The Southern Tip of the Western Front 1914-1918: The Terminus of the ‘Underground Railway' Oostende-Switzerland (Western Front Association journal). Some interesting details about alleged frontier violations in this area. In English language.
An Unfortunate Region (www.unfortunate-region.org). In English language. In them menu, choose “Battlefields”, then scroll down to the “Vosges” section which includes articles on the Franco-German fighting near the frontier and in the Vosges battlefields, as well as on “Km 0”.
Swiss defences in the “Km 0” area (www.schweizer-festungen.ch). In German language.
The Western Front north of Pfetterhouse (front-du-sundgau-14-18.jimdo.com). In French and German language.
Here and here: some interesting photos of remaining fortifications in the area, within France (pages14-18.mesdiscussions.net). In French language.
A video tour of some of the frontier area at Largin from the Swiss side, including the reconstructed bunker.