It seems that you have problems with the HDD connector, or with the HDD itself, this is indicated by errors "
ata2.00: ...". I would suggest cleaning the hdd connector pins and after that make sure the hdd is secure and not loose. Otherwise, the problems with random errors can happen again.
P.S. I was able to solve the 20.04's low performance problem by switching from an ext4 file system to BTRFS with zstd compression. This significantly reduced the number of I/O operations, which in turn had a positive effect on performing the entire system. Plus a little bonus - saving space on the HDD.