"liquid in a plant," Old English sæp, from Proto-Germanic *sapam (source also of Middle Low German, Middle Dutch, Dutch sap, Old High German saf, German Saft "juice"), from PIE root *sab- "juice, fluid" (source also of Sanskrit sabar- "sap, milk, nectar," Irish sug, Russian soku "sap," Lithuanian sakas "tree-gum"). As a verb meaning "To drain the sap from," 1725.
"simpleton," 1815, originally especially in Scottish and English schoolboy slang, probably from earlier sapskull (1735), saphead (1798), from sap as a shortened form of sapwood "soft wood between the inner bark and the heartwood" (late 14c.), from sap (n.1) + wood (n.); so called because it conducts the sap; compare sappy.
"dig a trench toward the enemy's position," 1590s, from French saper, from sappe "spade," from Late Latin sappa "spade" (source also of Italian zappa, Spanish zapa "spade"). Extended sense "weaken or destroy insidiously" is from 1755, probably influenced by the verb form of sap (n.1), on the notion of "draining the vital sap from." Related: Sapped; sapping.