I think it is probably a good idea for you and your son to have a dog if you have a committment to keep the dog as a member of the family for the next 15+ years to the end of its life.
Children who are raised around dogs are less likely to be fearful of them. If taught properly, by your example, they learn responsibility by seeing that companion animals must be cared for daily, exercised and properly trained. They can also learn kindness and compassion for others.
Children can also be taught to be uncaring and irresponsible if they are shown by example that a pet is disposable when they become bored with it or it becomes "inconvenient" instead of a member of the family.
I agree with looking at adult dogs. You might want to look at ones at rescue organizations or a shelter dog that is staying in a foster home. These dogs will have been observed by experienced people in a home situation and tested to give you a better idea of whether or not the dog is "kid friendly".
I don't don't know what you consider "small to medium" sized, but I would lean more toward the medium size. (which means 30-50 pounds to me) A little larger size prevents the child from being able to pick up the dog which makes the dog more durable and less likely to be injured by a child. Of course, dogs are more likely to bite or nip if they are frightened or hurt. Of course dogs each have their own personality, but in my experience, (in general) many of the smaller dog breeds are less tolerant of children.
Good luck!