The idea has merit, I think, but it's hard to say either way with 40k.
There are a few sorta hand-wavey ways you can go about explaining marines being only male, with this sorta being one of them. As far as adding stuff into the genome, assuming you add said stuff into a non-coding region, you can pretty much get away with murder; the body can't really tell if something isn't you once it's in the genome, especially in terminally differentiated cells - that's why retroviruses work. On the Y chromosome, it's true that it might be a little easier to do something like this and get away with it simply because there are comparatively fewer genes and the ones which are there can be fudged without the person dyeing. This might help to explain marines being incapable of fathering children as the process might cause a loss-of-functon mutation in a gene like spy which is needed to initiate spermatogenesis. So yeah, that's one explanation.
Another explanation, and one I like, is that aspirants undergo the process during puberty because maturation and activation of the various organs required male sex hormones, which increase drastically during puberty. If activation of the various organs were tied to DHT levels, for example, it would make perfect sense for the process to only work in males because DHT levels are considerably higher in males than females. I suppose you could supplement females with male sex hormones as a workaround, but why? It isn't as though the Imperium is lacking in young men. As far as this going into explaining why marines can't father children, well.... perhaps they can, just not with human women. Assuming that they can't reproduce with human women, it is possible that marines, due to whatever genetics modifications they undergo, are genetically different enough that they can no longer produce viable offspring with humans. Which would make them a different species, but, hey, space magic.
At the end of the day, you can explain away whatever you want in 40K however you want to do it, because none of it makes any god damn sense. Even what I said above is probably largely horse shit, and there's something I've forgotten from one of my genetics courses that explains why it's horse shit. But, again, space magic.
Oh, and to the psyker thing, I have no reason to think that it's a sex-linked trait, besides the fact that males and females can become psykers. It's entirely possible that the phenotype is polygenic and that the genes responsible are on one OR MORE different chromosomes, which may or may not include X. Polygenic incoherence can get complicated fast.