Here is a clever one ...
1/ Have intercourse with 3 good condoms.
2/ Ejaculate and insert the used condoms into her P*ussy overnight ...
That should do the trick ....
The best way to avoid getting infected is not doing it at all. sperm bank, test tube babies, adoption, are some of the other available options out there.