It is quite possible that the battery problem is having an impact, even if the machine is connected to power.
It may, for example, be overheating, due to its poor condition - heat is a known cause of spikes in kerneltask.
Regarding copying things from backup:
If all you do is erase, then install and restore everything, you just get back to where you started.
On the other hand, you could erase, install and then migrate only the user accounts.
This should get your mac to a more stable condition.
Note: I can't say if the option is available for the 2018 macs, but on my 2019 mac, and in more recent macs, you can actually just erase the data portion, while keeping the system volume intact. This is great because the system is read only; it saves a LOT of time, too. There is no need to install the OS, only to to migrate the user accounts from Time Machine, and install the applications, from the App Store or their websites.