I have the same computer. I had one from 2012ish to 2015 it became super slow and then the hard drive crashed, so I had it replaced and by early 2017 needed to replace the laptop. I then hunted for another refurbished 2012 and since about the beginning of this year it's been super slow. What i have learned is that I can't get a mac pro to last more than roughly four years before replacing the hard drive, and I think that that's fairly common?
I haven't yet but i've been meaning to take it in and upgrade the hard drive to SSD, i think it's called? I don't want to have to replace either as they are phenomenally expensive and it seems so silly to have to buy a new one every four years! Anyhoo, you could try changing the hard drive again, or just taking it in to a computer shop to diagnose. I'm in Australia and I was told to try a couple of places that basically do what you've done, wipe it, upgrade the hard drive and then put everything back on. Hope that helps? As you can probably tell, I am no massive computer person!