We report on the observations of four well-localized binary black hole (BBH) mergers by the High Energy Stereoscopic System (H.E.S.S.) during the second and third observing runs of Advanced LIGO and Advanced Virgo, O2 and O3. H.E.S.S. can observe 20 deg 2 of the sky at a time and follows up gravitational-wave (GW) events by "tiling" localization regions to maximize the covered localization probability. During O2 and O3, H.E.S.S. observed large portions of the localization regions, between 35% and 75%, for four BBH mergers (GW170814, GW190512 180714, GW190728 064510, and S200224ca). For these four GW events, we find no significant signal from a pointlike source in any of the observations, and set upper limits on the very high energy (>100 GeV) γ-ray emission. The 1 − 10 TeV isotropic luminosity of these GW events is below 10 45 erg s −1 at the times of the H.E.S.S. observations, around the level of the low-luminosity GRB 190829A. Assuming no changes are made to how follow-up observations are conducted, H.E.S.S. can expect to observe over 60 GW events per year in the fourth GW observing run, O4, of which eight would be observable with minimal latency.