Note about tech stealing: at each level, the chance of the espionaging race stealing the tech from the being espionaged race is higher, though the exact figure is not known. tech stealing is possible throughout all levels of espionage and not restricted to a specific level. let me underline one thing, technology theft in espionage is dependent on "chance", not how high your espionage with a specific civilization is.
Stopping Espionage Edit
Train your own agents to nullify enemy agents as they plant themselves in your planet or build counter espionage improvement to prevent the enemy agents from planting themselves in your planet.
Technology Theft Edit
Technology theft by the opposing civilization is displayed at the end of the game, but that technology theft display is inclusive of the technologies that are stolen from the planetary invasion. the actual technology theft through espionage can only be traced through turn by turn by differentiating the difference in technology in common(there is a tab beneath the head image, when you speak with a foreign civilization for tech trade) in the foreign trade window. needless to say, it is very tedious, thus i wouldn't recommand anyone doing it.