No, you give it to 10k people, and give a placebo to another 10k, and let them live their lives, and after 5 years or so you see how many of each group have contracted HIV.
The participants can have unprotected sex with HIV+ people if they want. It’s like the COVID-19 vaccine trials. The study designers didn’t set any parameters around mask use, social distancing, etc. It’s up to each participant to apply harm reduction practices as they see fit.
Notably covid vaccines were approved early because idiots in both arms didn't wear masks, and those in the control arms got very sick and died soon after the trial began.
In the USA, estimated new HIV infections in 2019 35k. Assuming 350 million Americans, that gives a very rough estimate of 1 case out of 10,000 per year.
You can enrich this by shifting target population. You could do this in the USA by targetting high risk communities, or by moving the trial overseas.
An trial in the USA with 10k in each arm could very likely be constructed to generate at least 10 cases per year. Likely up to 50.
Yeah, it's a phase 1 trial. In phase 1 they aren't even really looking at if the vaccine is effective, they're making sure that it's safe/side effects are reasonable, and maybe getting some dosage information out of it.
What you just described is a 'Challenge Trial'. These have been avoided for COVID and would likely be avoided for other diseases too on ethical grounds.
For a common cold, or other lower-impact disease, you could do a challenge trial.