On the paper 2018 should not have been a too bad year for republicans and you can say the same about 2014 concerning democrats as in both cases the economy was growing. The thing is that the most partisan voters, aka those who turn-out during midterms, don't care about the state of the economy and when the economy is doing well those who don't like the president anyway will simply give the credit to someone else (in 2018 most democrats gave the credit to Obama).
What made 2018 as bad is it was for Republicans (mostly in the House) was the fact that Republicans had a trifecta that allowed them to overreach (i.e. getting rid of SALT and trying to repeal ACA). Had Dems held the Senate, 2018 would likely have been quite a bit better for Republicans (less bad).