So you essentially purchased a feral pup. It’s not surprising that he’s touch shy. Time to build up trust is important, but so is vet care.
Does he have a crate he sleeps in? If so, take the crate with the pup in it to the vets. Let them know the history, they are well versed in handling different doggie issues. It’s important to get him vetted, especially if you’re in an area with high cases of parvo or distemper.