Whirlpool ultimate care ii

I have a Whirlpool Ultimate Care II model number SM8280867
It has been giving us fits for a while. It will complete the wash cycle but get stuck right before the drain and rinse cycle. I can bang on the top lid of the washer closer to the timer/control and it will start working again and finish the cycle. I’m thinking I am in need of a new timer. The last couple of days the banging on the machine doesn’t work but I’ve managed to get it going after a few attempts of running the control back through the cycle a couple of times.
I’ve been reading the forum andit seems like the timer or lid switch is the likely suspect. I’m thinking it’s the timer. Any suggestions?
Any help would be appreciated.
Thanks

I cannot get your model number to come up, but even without it I can say that the probability is very high it is the lid switch. You can check it by by-passing it or by just replacing it.