If the trait was significantly disadvantageous to the genetic survival individual - like it is in Iran, where people are executed for being homosexual - it may be bred out eventually.
With all due respect, I'm not sure that I follow your reasoning.
It is only when latent is actualised, that it will be bred out.
If homosexuality is banned, then it will just remain latent, and won't then die out
However, chances are that during this latent period of two generations, the genes have passed on to many more offspring than just the ones that exhibited the trait, who have in turn, passed it on to even more others. Some lines would die out, but others wouldn't and the population that carried the latent gene would in time grow larger again.
The best way to understand natural selection, is to think of it in statistical terms. It takes only a slight loss of reproductive capacity and the trait will become evolved out.
For example, if a sub-section of the population breeds even slightly less than the rest of the population over time., it is inevitable that this sub-section of the population will shrnk compared to the rest of the population.
That sub-section of the population which contains the latent homosexuality, which becomes expressed only under certain conditions, and as long as those conditions are sometimes fullfilled, will inevitably cause a shrinking of tha sub-section.
Because the latents will reproduce over time at a perhaps slightly lower rate than those without latents, the proportion of latents will inevitably decrease.
Natual selection is slow (perhaps) but sure
but others wouldn't and the population that carried the latent gene would in time grow larger again.
Only in so far as the whole population might increase, but the proportion of that population containing the latents will inevitably decrease over time as compared to the rest of the population, as its growth rate will be slightly lower due to a certain proportion of expressed latents
Of couse, if the whole climate of opinion in the country changed, then that would be different, but as long as the pro-homosexuality remains at its present level, then it might be that being evolved out is inevitable
It would take dozens of generations of extremely strict anti-gay policies to have any hope of breeding it out of the population.
As before, I'm at a loss to understand this idea.
Natural selection works in the opposite way.
It has to be expressed for it to be evolved out