One of my rescued dogs was abused too. He came to us starved, teeth broken, and extremely nervous around males. We've had him for over 9 years now, and he's completely healthy and happy. However, he's always been known to escape and run away from home. Even though we rescued him and he's happy here, running away is just something from his past that we won't be able to change. We just keep him safe by making sure he's always on a leash when he's outside.
The lack of trust with people is probably just an affect of your dog's previous life, unfortunately, and may never go away. But what really counts is that he trusts and appreciates you and his loving family. I don't think you've done anything wrong; I think you've done everything right by giving him a better life and earning his trust.