The external solution can be a little as US$100 and, when you sell this computer on, the external drive will still work on your next one. So it is not the case of throwing good money after bad.
New or used, if you replace this Mac, go ONLY for an internal SSD no smaller than 500GB. If shopping for new, that means you are now in the 27-inch iMac market, as Apple have limited SSD sizes on the 21.5 inch models to a measly 256GB. Apple refurbs are good value for money but you have to carefully look at specs to make sure you get the internal SSD and not a mechanical or Fusion drive.
Is it the hard drive limitations that causes the kernel panic?
As your hard drive is only slow, not unhealthy, it is not high on my list. My prime suspect are TWO third-party backups software packages that may be in conflict with Time Machine One aroused Etrecheck's diagnostic attention as needing cleaning up:
Clean up:
/Library/LaunchDaemons/com.easeus.dataprotectbackup.plist
/private/var/folders/lh/11twr9js38b43hx8zm9qpb040000gq/T/AppTranslocation/9E2C0934-E2DC-4805-834B-342F8D0471BE/d/EaseUS Data Recovery Wizard.app/Contents/MacOS/EaseUS Data Recovery Wizard.app/Contents/Resources/EUDataDaemon.app/Contents/MacOS/eudataback
That indicates the program could be still partially installed and some components still working.
Scheduled full backups need to be to Time Machine. Of-site archiving of small numbers of files as your save after an edit is fine for the other services but never try to back up a massive block of files that way. I use Dropbox for work files that I may need to access on the road from my notebook computer. Very handy.
Our wise Toad has also mentioned CCleaner. Remember, the macOS—catlike—cleans itself, and very well.
I've noticed that Affinity Photo seems to cause speed problems.
Could be the slow drive and big image files. I have an entry-level 2012 MacBook Pro running Mojave. It has a FAR less capable processor than your iMac and the same 8GB RAM. I've not use Affinity Photo a lot on that computer but I recall no noticeable slowness. In fairness, I upgraded it to an internal SSD about 3 years ago because that model had the same hard drive issue and yours. That model allowed easy user-replaceable parts unlike the sealed-case iMacs made after 2011.