I've stolen techs after hitting Advanced without any money going into espionage, so yes it's possible.
Defending planets: Well, the Planetary Defense improvement helps a little, and I think you can stack them. I would actually recommend Soldiering, though, if you can afford to take the time to reasearch those two lines (which aren't actually all that expensive). With high soldiering (playing Custom race helps, as does a Tir-Quan center), good technology, and a high planetary population (farms, aphrodisiac, frisky citizens, and high morale all help here), it's possible to simply resist invasions. The problem is that the AI will ramp up their tactics, but if you can use a light and fast fighter to disable unprotected transports on many occaisons, you might be able to simply let the escorted ships hit you.
I remember one game (AI at Intelligent) where the Yor utterly dominated my airspace during a surprise war. I had something like two ships. Those two ships did hit-and-run against undefended transports, but defended transports all made it through. Thing is, I was Custom with a Tir-Quan and maxed soldiering, plus technological dominance and a much-boosted pop growth. They invaded and invaded and invaded and invaded until they went broke from all the Mass Driver Bombardment, and I didn't lose a single world.

Edit: Oh, and then there was mass genocide. They surrendered, I demanded all of their meager tech as my price, and then I declared war and consumed them. Jerks.