The only prerequisites are 1: Destruction of the station if present, 2: Exceeding the defenders' force strength with Marines and Heavy Equipment.
3. Having the Nexerelin mod installed.
I think you can see an issue here.
I think the issue is I'm a dum-dum. If invasions are ever implemented though, I'd hope it's something along these lines. In any case call it food-for-thought.
On raids, these could be similarly changed up. I don't like that there's no way for the faction whose planet you're raiding to prevent you from successfuly carrying it out once you've destroyed the station and orbital fleet, again assuming you exceed the threshold of marines. Of course a raid is of a much smaller scope than a full-on invasion, and is meant to be completed within hours I'd imagine, but I think it could be reasonably extended to a few days - Finding a suitable, safe landing zone, assaulting the facility/ies, extraction. This would give both players and NPC factions that window of opportunity to stop a raid-in-progress - if they're able to destroy/foce retreat of the raider's fleet(s), and have marines of their own to counter-deploy.
Once the raid is complete, the player is given the option of having the marines stay on the planet and conduct another - increasing the payout, but increasing the rate at which marines are lost, risking that the raider's forces are wiped-out and all the loot is reclaimed by what's left of planetary defenders.