Okay, remember that I did warn you!
REPEAT! SPOILER EXPLOIT WARNING!
Before I start, be advised that it works best if you have high intel level, though it is not strictly necessary.
The corral approach is based on the AI near-inability to change target so long as the existing target continues to exist.
You get an AI ship or fleet chasing (or seen to be targeting) a ship or something. Next, you bring 8 ships -ultra cheap is fine! - into its path and englobe it. It cannot move until it re-targets one of the 8 posts in its "corral." Meanwhile, ship #9 loiters nearby thumbing it pixel nose.
The same principle can be used in reverse to protect mining starbases. That is, put your own base in a corral of 8 ships. The AI cannot target the base until it removes a corral post. Again, a 9th ship is handy (along with high intel) because if the AI targets a fence post, you rotate the targeted ship onto the mining base square and put a new ship in its "post hole." Again, the AI cannot retarget.
IIRC, one can also englobe/corral a target planet. Again, IIRC, no ship can be built/launched when there is no free square into which it can be launched. This makes invasion easier and, when you finally capture it, the planet will have gobs and gobs of shields ready to be used instantly as a present!
Note that if you do not have the 8 ships, as long as the AI speed is fairly low, you can make a wall of 5 or 6 and frustrate the AI ship/fleet indefinitely by playing keep-away with your ship going "through" the wall and the AI condemned to forever be going around it, unable to catch it.
Once, as a test, I walled off half the map with cheap ships, kept a few post-replacements handy in case a post got targeted, and the AI never crossed it.
Another time, I "herded" a particularly nasty AI fleet via parallel lines straight to the planet of another AI with which it was also at war (but I was not). The second AI put together a fleet and I graciously "opened the gate" and watched the battle!