Nicely said ^^
But yes, males can turn females this way (by radical stress but also by chems).
In fact the herm trait is not so much binary (male/female), what you are describing is an andromonoecy or an androdioecy.
In term of genetic, the insane overall torture will not affect the progeny like a "stack of successive data" computed. But for sure you're testing your latent herms in this subgroup the best way possible.
To come back in the subject : If by example you want to breed a strain for arid zones, you will make first an "acclimatization". The first three generations will only be used as a deadly filter, letting express the most resistant specimens for these conditions.
Then you're making pure lines with these resistant specimens to test afterward the inheritance value of this specific "global trait", and to "draw a map" of what to seek in the offspring. This way you will known than (trait A + trait B + trait C + whatever) = arid lines version of initial strain.
This is off course not automatic, somes lines will not handle it because the genetic ressource is not compatible. Others will just work like a charm without too much compromises on the final product, because they are initially made to work in these conditions or because they contain genetically enough code to handle it (typically the case of the old hazes VS modern dutch hazes, in term of adaptability).
The man hands are very limited to something "not natural" to change the code (over to drive it with enough time, like a taxi driver), and it's called mutations if i globalize. In applied genetics, you literally write a mutation from markers, in farming you will generally use chems/hormons to obtain it (fem seeds, triploids selections ...).