The 300 knowledge gathered is indeed correct, as you can gather from neutral planets.
While I bet this was not the intention, auto-gather still works fairly well if it automatically goes to command stations in progress. If you are building one, chances are you have a significant beachhead, or the planet is already cleared out.
Granted, if the science vessel went through a wormhole that did *not* lead to your beachhead, that could be a problem. Not sure how often this would occur though. Might not be that rare, if I border an AI world on two wormholes, I go through one and establish beachhead and command station, then a sci vessel on my other adjacent world goes through its connection and is blown away because I that section of the planet has not been cleared yet.