You don’t say what you are looking to ferment, nor what recipe/ method you intend to use?
There is no way to completely avoid pathogens when utilising microbes in food prep, all you can do is minimise risk. Even commercial food manufacturers experience contamination occasionally.
Source of ingredients and starter culture, selection of recipe (inc. ‘pedigree’ of the author), kitchen and personal hygiene, appropriate equipment, not cutting corners, storage container and conditions are all important.
Sugar-laden fruit jams/ jellies are very different to fermented vegetables or dairy. Greaseproof paper is very different to a boiled stone. Source a weight that is food safe and can be sterilised.