As many here already said: Elite can be pretty mean concerning consequences, but actually that's also awesome about it because not many games nowadays are like that. I'm sorry for your strain of bad luck, but what's most important about Elite in my opinion, is, that most of the things which lead to disaster can be avoided by knowledge and skill. "Skill" not like in that "git gud" nonsense, but in a way of getting used to fly and tackle unusual situations.
In your case that's taking the repair unit with you, know how to avoid scans, have a routine of getting away when interdicted.
For the last two there are solutions that never failed me so far, which is:
Avoid scanning: experienced smugglers might have more to offer on this, but I keep my finger on the "silent run" button and as soon as the "Scan detected" message comes in, I push it, throttle up and pop a heatsink. Always saved me from being scanned BUT you actually can be scanned nontheless on a very short range. So it's not a 100% thing, but a pretty sure thing even if the "being scanned" message already is on the HUD.
Get away in case of interdiction: winning the interdiction game is, of course, the best way of getting away, but if this isn't likely it's best to throttle to zero, which means you submit to interdiction. The difference is: if you are pulled out, the FSD cooldown takes much, much longer than on submitting. You are up and running in no time if you submit.
Once submitted, all pips on Engines and boost like hell. If you are being hit, all pips on sys for harder shields and boost. As soon as the FSD is up again charge it up. Another failsafe right here: Sometimes the FSD charges very slowly due to restrictive mass. That happens when you are being interdicted by bigger ships, but it ONLY happens when charging to supercruise. If you hyperjump to another system, it doesn't and charges as usual. If you have always another system locked, you can also be prepared to get away faster. There is also a "resume route" button mappable in the controls which sets you back to the selected system should you have changed target within the system.
If another player interdicts you, rules are very different I fear. Always highwake, and there might be other strategies, but since my exploration ship lasts about 3 seconds under player attack, I can only say: turn around, boost into the other players direction while doing some dodge maneuvers and pray.
Many things in Elite that might lead to disaster lose their teeth if you know how to counter them. It's part of the simulation that is in Elite and of the learning curve. Can be frustrating, but it's even more rewarding once you tackled these obstacles. Hope you'll find your way back into the cockpit. Fly safe. o7