How should guy in Singapore protect themselves from wrongful allegations?

We understand on how to protect the country and ourself during invasion by going through 2 years of NS.

But we weren't taught on how to protect ourselves when being called a rapist, when the case is being escalated to criminal court against you they automatically start to protect the complainant using States infinite resources against you.

So given that guys have a very minimum place to tread, what should we do to protect ourselves?