If you truly are smelling mothballs, that is Naptha,
From the MSDS
bear in mind this is for the liquid
Potential Chronic Health Effects:
Hazardous in case of skin contact (irritant), of eye contact (irritant), of ingestion, of inhalation.
Slightly hazardous in case of skin contact (permeator).
The substance is toxic to skin, eyes, central nervous system (CNS).
The substance may be toxic to blood, kidneys, lungs, the nervous system, mucous membranes, peripheral
Trying to seal with latex will not work (it is permeable) you should probably consider giving up on the trim/door stop which from your description (doesn't smell when it is gone, does when it is present) is the culprit and make it using solid dry doesn't smell wood.
My participation in this forum has been a true education particularly with respect to what can go wrong.

were I to be building I would be using composites or marine grade US or Canadian made plywood. Yes it is more expensive but how much is your time and effort worth. And let folks at Lowes et.el. know that what they are selling is unacceptable.