You can, it's called get good at piloting and engineer your ship. I barely play as other games like Overwatch really trigger my ultra competitive nature, yet I still have a ludicrously decked out Corvette, a decent ish FDL, and plans for a Sidewinder and a Vulture engineered to hell and back, along with maybe a federal pew pew gunship and a racing courier, and an exploraconda. I'm not some godly amazing pilot or anything but I at least have enough confidence in my ships to be able to survive a sudden "gank" or "griefing" as you call it.
You can too, stop playing the victim card and have some confidence in yourself, take some time to Engineer your ships, and unlock the Engineers you need. You're gonna need them in the future probably anyways vs Thargoids (which at minimum means palins thrusters / dirty drives 5 and hes one of the harder ones to unlock). Just get out there and Shia Lebouf it, just do it. You'll find yourself having fun with the game more when you realize you've gained the ability to do whatever you want. Most "hostile" player actions are starter systems, Shinrata, CGs. And would, if doing CG's is that important to you, to one jump before the CG system hop into private or open to drop the goods off at the station be that much of a problem if you are that worried about being killed by another commander (a feature even advertised as one of the selling points of the game)?
Just try engineering man, you'll need it in the end for PvE content too so just do it already.