I found that to make the MTH handcar mechanism reliably switch directions, the handcar has to go at a fairly good clip essentially banging into the bumpers.
This is probably more effort than you want to put into it, but I installed magnets on the track near each end to electrically reverse the direction. The handcar now reverses before reaching the end-of-track bumpers. The reversing "electronics" can be as simple as a DPDT relay which performs the same function as the bump-and-reverse mechanism (a DPDT switch which reverses the polarity of the voltage applied to a DC can motor).