  This paper describes an improved mapmaking approach with respect to the one
used for the Planck High Frequency Instrument 2018 Legacy release. The
algorithm SRoll2 better corrects the known instrumental effects that still
affected mostly the polarized large-angular-scale data by distorting the
signal, and/or leaving residuals observable in null tests. The main systematic
effect is the nonlinear response of the onboard analog-to-digital convertors
that was cleaned in the Planck HFI Legacy release as an empirical time-varying
linear detector chain response which is the first-order effect. The SRoll2
method fits the model parameters for higher-order effects and corrects the full
distortion of the signal. The model parameters are fitted using the
redundancies in the data by iteratively comparing the data and a model. The
polarization efficiency uncertainties and associated errors have also been
corrected based on the redundancies in the data and their residual levels
characterized with simulations. This paper demonstrates the effectiveness of
the method using end-to-end simulations, and provides a measure of the
systematic effect residuals that now fall well below the detector noise level.
Finally, this paper describes and characterizes the resulting SRoll2 frequency
maps using the associated simulations that are} released to the community at
http://sroll20.ias.u-psud.fr.
