There is nothing random about DG2. That being said, any random gameplay should not really be rewarded. Of course, if the reward is the gank itself (thereby rewarded outside the game structure, assuming the ganker gets a dopamine rush from blowing up tin cans, or something similar), the game should at least add mechanics detrimental to such behaviour if the behaviour is not wanted in the game.
I am not for having some sort of parental system in place that limits the gankers from playing how they want to. So wagging fingers and saying "bad ganker, bad bad ganker" will never work. Instead encouraging the explorers to protect themselves may be a better solution. Protection Versus Ganking +2 modules are not a solution either, nobody wants to drag such specific modules around if such modules are not useful for current gameplay. But shields would be immensely more attractive to explorers (and traders) if the environment in general was harder on shield-less ships. And shields also protect against a few volleys of enemy fire, so generally very useful.
Other solutions would be to make attacks on random and seemingly defenseless ships more risky. Defense systems could be introduced that would paralyse an attacker. They could be single-shot features and restricted somehow (PF might log their use, for example). Whatever the solution, it should be in-game and make sense from a game-world perspective. Gankers would then have to take a real risk into account, which would take the randomness out of the ganking itself.

S