"juice or fluid which circulates in plants, the blood of plant life," Middle English sap, from Old English sæp, from Proto-Germanic *sapam (source also of Middle Low German, Middle Dutch, Dutch sap, Old High German saf, and, with unetymological -t, German Saft "juice"). This is reconstructed to be 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," by 1725.
"simpleton," 1815 (Scott), a word appearing at first especially in Scottish English and in English schoolboy slang, probably shortened from earlier words in related senses, such as sappy, sapskull (1735), saphead (1798). The notion perhaps is from sap (n.1) as suggestive of freshness or "greenness" (sapling in the extended sense of "young or inexperienced person" is attested from 1580s). Or perhaps it is a shortening of sapwood "soft wood between the inner bark and the heartwood" (so called because it conducts the sap), which was considered inferior material in carpentry.
The Joyner, though an honest man, yet hee maketh his joynts weake, and putteth in sap in the mortesels, which should be the hart of the tree, and all to make his stuffe slender. [Robert Greene, "A Quip for an Upstart Courtier," 1592]
Also as a verb, "to act like a sap."
1590s, intransitive, "dig a covered trench toward the enemy's position," from French saper, from sappe "spade," from Late Latin sappa "spade, mattock" (source also of Italian zappa, Spanish zapa "spade"), which is of unknown origin. The transitive sense of "undermine (a wall, etc.), render unstable by digging into or eating away the foundations" is from 1650s.
The extended transitive sense (of health, confidence, etc.), "weaken or destroy insidiously," is by 1755 and perhaps has been influenced or reinforced in sense by the verb form of sap (n.1), on the notion of "draining the vital sap from," and later by sap (v.2) "beat with a club or stick."
It also sometimes is used as a noun, "a narrow, covered ditch or trench by which a fortress or besieged place can be approached under fire" (1640s). Sap (n.) in the "tool for digging" sense also occasionally is met in 16th century English. Related: Sapped; sapping.
"club or stick for hitting," implied by 1899 in "Tramping With Tramps" (saps), and perhaps originally a word from that subculture; said in earliest references to be a shortening of sapling, which was noted by 1712 as something you could use as a weapon to beat someone with. Also sapstick (1915).
"hit with a sap," 1926, from sap (n.3). Hence, in a general sense, "to beat up." Related: Sapped; sapping.