Everyone's suggestion is valid and needs to be checked out. The strange thing about your posting is that the autopilot was fine on the way out for your trip then acted up on the way back, when your course was reversed. This may indicate a compass problem. It may be necessary to swing ship in the calibration mode to re-align the fluxgate compass.
I had an issue with course wandering when using the ST4000 on a Legend 35.5, a common problem, especially with older Hunter's light weight, underwater configuration, short keels and spade rudders. The 29.5 is an excellent example of these characteristics. Changing the rudder response setting helped some but the problem never went away. UNTIL, ...a friend of mine changed boats and had a spare ST4000 drive unit that he gave me. I changed to that drive unit and the problem was all but gone. Turns out Raymarine made two different drive units; a black one (no longer made) and a gray one. The gray one is more powerful, has less moving parts, and does a much better job with course keeping. It is also more effective in stronger winds. You may want to purchase that drive unit if all else fails. There are some differences in measurements that you need to address upon installation.
I also found that whenever I talk to Raymarine Tech I always am advised to purchase something to correct a problem. They suggested, as with you, to purchase a rudder position indicator/sensor which, I am sure would probably help, but, to me, the newer drive unit is preferable. AND, it being still available you may be able to find it on ebay or some such place.