The 1300s in England were a time of the hillforts. The economy was mostly agrarian but several royal and baronial castles dotted the lands and there small kings and barons were often trying to extend their domains. It was a time of several wars.
This was the Iron Age and getting through fortified castle walls was not easy. Medieval siege warfare was brutal and extremely human intensive. These were meat grinders where several men had to be lost to get through the fortifications.
One of the methods that was devised as a means of getting around the fortifications was to dig under the foundation of the walls to weaken the walls and make them easier to bring down. This practice of weakening the foundation came to be known as undermining.
This practice also gave rise to technique of fighting wars from covered trenches known as sapping. The divisions engaged in these operations came to be known as Sappers. The engineering regiment of the Indian army located off Ulsoor Lake, Bangalore is known as the Madras Sappers.
It was not until the 15th century that word started taking a metaphorical meaning which it is known for today.

