The vastly better M&P series that replaced the 5900 series has a better accuracy reputation.
While the M&P is in most respects a better pistol than the S&W Third Generation pistols, I would say that the reputation for accuracy is the other way around, at least when it comes to the 9mm versions.
That being said, if you want to pick up one of the older S&W autos, I would have two recommendations:
1. Keep in mind that spare parts may be difficult to source, as they have been out of production for many years.
2. I would choose a DA/SA version over DAO. You will still have ample opportunity to master the double action trigger, but I think you will find that follow-up shots at speed are much easier.