Maytag Dryer automatic cycle does not work

All, we inherited a Maytag 5000 series electric dryer (Model: MEDE500VW1) from the previous owner when we purchased our home. The dryer heating element works fine and if I run it on a timed cycle, it turns off exactly on time and dries the clothes.

However, if I choose an automatic cycle, it starts with a 40 min cycle, it goes down to 11 mins and then waits there for quite a long while and does not turn off even after the clothes are dry. The moisture sensing indicator shows clothes progress from wet to damp but it does not go beyond that. We need to guess and run it on a timed cycle or remember to check and turn it off.

I opened the lint filter and cleaned out the entire space. I checked the moisture sensor bar and it did not show signs of any damage. I removed and cleaned both the sensor bars and connected them back. That does not seem to have done the trick.

Any suggestions on which part to replace would be greatly appreciated. Having just moved in and having dried my finances, I really want to fix this if possible.