Change inchikey directly Preamble: 
Now, I am aware that directly editing the inchikey is, generally speaking, a bad idea, but...

Can I just change the 2nd block of an inchikey to "UHFFFAOY" to get the correct main-layer-only version of the inchikey of that molecule?

example where this seems to be the case (from pubchem):
BSAIUMLZVGUGKX-BQYQJAHWSA-N = trans-2-nonenal
BSAIUMLZVGUGKX-FPLPWBNLSA-N = cis-2-nonenal
BSAIUMLZVGUGKX-UHFFFAOYSA-N = 2-nonenal

I have seen lots of other examples (100s if not 1000s) to support this hypothesis (both for cis/trans and for sterochemistry) and never a counter-example.
According to the InCHI FAQ, the 2nd block encodes "encodes stereochemistry and isotopic substitution information". So if you want to generate the corresponding InChIKey for the case where there is no stereo present nor isotopes specified, then it looks like this is possible. If you also want to force the neutral form, you could try setting the final character to 'N' (it may instead be P or O).

Your mileage may vary. To be honest, I wouldn't do this if I were you. I would generate a SMILES without isotopic or stereo information (or remove this programmatically), and then get the InChIKey of that. This would avoid any nasty surprises.