I can't give the tech, as that would give the custom race the academy as well, since the academy has PlanetaryInvasion as a prereq and that's something I'm specifically trying to avoid.
This is more or less what I was suggesting. In ImprovementDefs.xml change the xml for MilitaryAcademy from:
<Prerequ>
<Techs>
<Option>PlanetaryInvasion</Option>
</Techs>
</Prerequ>
to
<Prerequ>
<Techs>
<Option>SomeOtherTech</Option>
</Techs>
</Prerequ>
With "SomeOtherTech" being just about anything in that area. My rationale is IF planetary invasion is hard coded, then simply attach the Military Academy improvement to something that isn't hard coded and make a fluff version of that tech for your custom race so they won't get it whilst everyone else will.
You shouldn't even need to change any of the other races since they'll follow the xml def in ImprovementDefs.xml.
That's the workaround that immedately comes to mind. Basically nothing says that the Military Academy HAS to be attached to the Planetary Invasion tech. As long as it is more or less researchable at the same point in the Military Tree and the tech is available to everyone else, I don't see a particular reason why it can't be shifted. Annoying that one has to do this, yes. But that's why it is called a workaround, I suppose.
What I did was: Create a duplicate tech with a DIFFERENT GenericName. I duplicated the transport module and made my new tech show up. The game even uses the replacement module on transport ships. However, as soon as you fly your transport to a hostile planet (after first clearing any defenders of course) you get a pop up along the lines of:
"The Planetary Invasion technology is required to invade."
I would have assumed
<Stats>
<EffectType>CanInvade</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>1</Value>
</Stats>
on the module would have been enough to allow it to be used in an invasion, but sadly this does not seem to be the case.
This does sound like a bug, so perhaps you should send a ticket to Stardock about it. I am curious though if the ship itself says it can invade planets when you click on it/pull up details about it. If it doesn't, then perhaps something is wrong with the XML parsing somewhere. If it does, then it is very probably a bug and something SD should be made aware of.