Unless it has changed since the last time I tried stealth, using active sensors may give away your position but it does not allow them to lock onto you with weapons. So you could fly in, activate sensors, and fire off missiles. Even if their missiles outrange yours, they can't fire them at you unless they get their own active sensor contact on you. The EM from your sensors lets them see where you are and move toward you, but as long as you're around the same speed or faster than them you can keep out of their range and fire away then deactivate sensors and be undetectable again (assuming they aren't spotting your thermal). At which point the AI tends to go to your last known location to look for you, but if you move away they'll never find you.
You could even have missiles with their own sensors and just fire at where their EM or thermal contacts are and let them lock onto their targets once they get there. In that case you would never need to activate any sensors, so they'd never even see your ship at all. In one game I had a JP make a new link (created after all their own JPs were explored, so they never knew it was there) to an NPR system. I was able to send stealth ships in with low thermals and a small cross section and harass them with impunity, nuking their ships without them ever seeing where the missiles were coming from.
Just don't get so close that you move into their missile sensor range, since those will see you no matter how small your ship's cross section is.