Fermentation is pretty much safe. Make sure you get two things right:
1. Salt. You want at least 2% by weight (vegetables and water). Recipes differ, up to 5-ish %, just follow the recipe.
2. Anaerobic. No need to fear opening the jar every now and then, but submerge the vegetables in the brine and don't stir the brine much when you open the jar (to taste it, for example). There may be white fungus on top where the brine-air line is, but that's benign. Just skim it off.
If you make sure those two conditions are met, lactobacilla (and yeast) will out-compete everything else. Especially everything dangerous.
1. Salt. You want at least 2% by weight (vegetables and water). Recipes differ, up to 5-ish %, just follow the recipe.
2. Anaerobic. No need to fear opening the jar every now and then, but submerge the vegetables in the brine and don't stir the brine much when you open the jar (to taste it, for example). There may be white fungus on top where the brine-air line is, but that's benign. Just skim it off.
If you make sure those two conditions are met, lactobacilla (and yeast) will out-compete everything else. Especially everything dangerous.