I do not believe someone should be jailed for not disclosing; they may need counseling and support, but not jail.
I remember in the early days of this pandemic, some hospitals in my area tested pregnant women without their knowledge or consent and did not tell the women when the results were in. Supposedly this was done for "research" purposes.
But I personally would have to disclose. I would not want to put a child in harm’s way, especially my child.