A jury has been told a man accused of killing a toddler in the NSW Hunter Valley almost 20 years ago gave the boy a toxic dose of antidepressant medication, a charge the man denies.