Owing to their rapid cooling rate and hence loss-limited propagation distance, cosmic-ray electrons and positrons (CRe) at very high energies probe local cosmic-ray accelerators and provide constraints on exotic production mechanisms such as annihilation of dark matter particles. We present a high-statistics measurement of the spectrum of CRe candidate events from 0.3 to 40 TeV with the High Energy Stereoscopic System, covering 2 orders of magnitude in energy and reaching a proton …