We use wavefront sensing to characterise the image quality of the the High
Resolution Telescope (HRT) of the Polarimetric and Helioseismic Imager (SO/PHI)
data products during the second remote sensing window of the Solar Orbiter (SO)
nominal mission phase. Our ultimate aims are to reconstruct the HRT data by
deconvolving with the HRT point spread function (PSF) and to correct for the
effects of optical aberrations on the data. We use a pair of focused--defocused
images to compute the wavefront error and derive the PSF of HRT by means of a
phase diversity (PD) analysis. The wavefront error of HRT depends on the
orbital distance of SO to the Sun. At distances >0.5\,au, the wavefront error
is small, and stems dominantly from the inherent optical properties of HRT. At
distances <0.5\,au, the thermo-optical effect of the Heat Rejection Entrance
Window (HREW) becomes noticeable. We develop an interpolation scheme for the
wavefront error that depends on the thermal variation of the HREW with the
distance of SO to the Sun. We also introduce a new level of image
reconstruction, termed `aberration correction', which is designed to reduce the
noise caused by image deconvolution while removing the aberrations caused by
the HREW. The computed PSF via phase diversity significantly reduces the
degradation caused by the HREW in the near-perihelion HRT data. In addition,
the aberration correction increases the noise by a factor of only 1.45
compared to the factor of 3 increase that results from the usual PD
reconstructions