  The metric and the electromagnetic potential generated by a static,
spherically symmetric charged massive object in any dimension are given by the
Reissner-Nordstr\"om-Tangherlini solution. We derive the expansion of this
solution up to third post-Minkowskian order by computing the classical
contribution of scattering amplitudes describing the emission of either a
graviton or a photon from a massive charged scalar field up to two loops. In
four and five dimensions these amplitudes develop ultraviolet divergences that
are cancelled by higher-derivative counterterms in a way that generalises what
was recently shown to happen in the chargeless case. This renormalisation
procedure produces logarithmic terms that match exactly those produced in the
post-Minkowskian expansion of the classical solution in de Donder gauge.
