Context. The study of high-redshift bright quasars is crucial to gather information about the history of galaxy assembly and evolution. Variability analyses can provide useful data on the physics of quasar processes and their relation with the host galaxy. Aims. In this study, we aim to measure the black hole mass of the bright lensed BAL QSO APM 08279+5255 at z = 3.911 through reverberation mapping, and to update and extend the monitoring of its C IV absorption line variability. Methods. We perform the first reverberation mapping of the Si IV and C IV emission lines for a high-luminosity quasar at high redshift with the use of 138 R-band photometric data and 30 spectra available over 16 years of observations. We also cross-correlate the C IV absorption equivalent width variations with the continuum light curve to estimate the recombination time lags of the various absorbers and infer the physical conditions of the ionised gas. Results. We find a reverberation-mapping time lag of ∼900 rest-frame days for both Si IV and C IV emission lines. This is consistent with an extension of the BLR size-to-luminosity relation for active galactic nuclei up to a luminosity of ∼10 48 erg s −1 , and implies a black hole mass of 10 10 M . Additionally, we measure a recombination time lag of ∼160 days in the rest frame for the C IV narrow absorption system, which implies an electron density of the absorbing gas of ∼2.5 × 10 4 cm −3 . Conclusions. The measured black hole mass of APM 08279+5255 indicates that the quasar resides in an under-massive host-galaxy bulge with M bulge ∼ 7.5M BH , and that the lens magnification is lower than ∼8. Finally, the inferred electron density of the narrow-line absorber implies a distance of the order of 10 kpc of the absorbing gas from the quasar, placing it within the host galaxy.