The flaw is that you can't equate natural and artificial dangers. Natural dangers are equal-opportunity dangers. Artificial dangers can be used to oppress people.
Also, avoiding behavior X is not enough to avoid the danger. There's not much evidence that Brett Kavanaugh was ever alone with Christine Blasey-Ford, but he still faced serious danger from her.
I don't do drugs recklessly. I don't have reckless sex. I do not think these things should be okay to do until and unless you take the proper care to do them without causing harm to others. If you don't take the proper care, then it doesn't matter whether the danger you run afoul of is "natural" or "artificial". Taking the proper care obviates both types of dangers.
Don't be reckless, or the life you ruin might not be your own.
You can be very careful, and still end up on the wrong side of a baseless claim. Could be anything from a lie, to a dream, to mistaken identity, to a drug dog sneezing. Without due process, anything goes, and being careful isn't enough, because suspicion becomes guilt and by the time you sort anything out the damage is done.
And artificial versus natural does matter. It's the difference between misfortune and injustice.
In the OP's situation, basic sexual hygiene would have prevented the whole thing. It will for everyone that doesn't put themselves first and foremost in a shooting gallery.
You can use the concept of herd defense to contemplate how to remain safe in these sorts of situations.
If you're a kid in this position, wondering whether it's dangerous to have sex, the answer is yes, it's one of the most dangerous things you can possibly do. Wasn't that long ago that having sex could put you in an early grave with an uncurable disease.
So just add "false accusation of rape" to the ever growing list of things that can happen to you if you're not careful with your jubbly bits.
Get everything in order before you start having sex. If you're in school, make sure your grades are decent, you know how to wrap it, line up someone who you know is interested and already have a friendly rapport with.
To go about it in any other way at all is to invite grave danger. It's always been this way, there has been no point in at least the last 1000 years, probably even longer that sex couldn't royally ruin your life.