It's quite easy to solve actually.
We can have an app where if you consent to have sex with someone then your sexual health status is automatically shared with whoever you consented to before the act.
You only have sex once you get green light, otherwise you are on your own!
Does it breach their right? IDK, I'll let someone HNer educate me on that.
And if it's a solution then why isn't it being implemented, how can we leave it upto people to be truthful about their status?