stealth armor will hide you from random ships if you aren't right on top of them, but the random spawns will still go right for you, they will need to be diverted through code.
You would run a repeating event that scanned the system the player was in for ships targeting the playership, and then change those ships orders. It would be clunky, but possible (ie. a hack).