HD is genetic. The dog either has it or it doesn’t. If the dog has “mild HD” from birth, then strenuous exercise is detrimental. If the dog doesn’t have HD at all, no amount of exercise will cause it. Some people also argue that keeping a dog in shape, with stronger muscles, helps a dog with mild HD because it allows their muscles to keep the bones in the joint separated.
There’s no use worrying about it unless you’re seeing signs and then the only solution is to go and get the hips x-rayed.
Running on softer surfaces doesn’t affect dogs. They’re meant for it. The amount of running on dirt/grass/sand doesn’t affect joints. Running on pavement isn’t recommended until the joints are formed, so unless you forced him to jog next to you for miles while you were training for a marathon, it probably didn’t cause any issues. Running on those softer surfaces is even recommended for humans, a lot of stress is caused on joints by running on pavement. This is why we wear expensive shoes that are meant to absorb a lot of that stress.