hi dear, u have asked a very good question. as u said herpes
definetly is passed when mother has a lesion but as the virus starts replicating 7 days before the lesions appear so there is a chance that the baby gets effected even if mother is asymptomatic.
regarding heredity, it is not hereditary but if there is rupture of membrane the unborn baby gets effected, hence many doc prefer doing caesarian section in such cases.
hope i answered ur query.