Most ions lack the fast, cycling transitions that are necessary for direct laser cooling. In most cases, they can still be cooled sympathetically through their Coulomb interaction with a second, coolable ion species confined in the same potential. If the charge-to-mass ratios of the two ion types are too mismatched, the cooling of certain motional degrees of freedom becomes difficult. This limits both the achievable fidelity of quantum gates and the spectroscopic accuracy. Here we introduce a novel algorithmic cooling protocol for transferring phonons from poorly- to efficiently-cooled modes. We demonstrate it experimentally by simultaneously bringing two motional modes of a Be$^{+}$-Ar$^{13+}$ mixed Coulomb crystal close to their zero-point energies, despite the weak coupling between the ions. We reach the lowest temperature reported for a highly charged ion, with a residual temperature of only $Tlesssim200~mathrm{mu K}$ in each of the two modes, corresponding to a residual mean motional phonon number of $langle n rangle lesssim 0.4$. Combined with the lowest observed electric field noise in a radiofrequency ion trap, these values enable an optical clock based on a highly charged ion with fractional systematic uncertainty below the $10^{-18}$ level. Our scheme is also applicable to (anti-)protons, molecular ions, macroscopic charged particles, and other highly charged ion species, enabling reliable preparation of their motional quantum ground states in traps.