How could you solve this?
Currently you can't just log off during an attack, there is a 15 second wait period. Could this be extended? 30 seconds? 1 minute? Or just no quit until you're back in supercruise?
If someone's ISP cuts them off, or their router reboots etc. then an automatic penalty has to take this possibility into account. You can just destroy everyone who disconnects every time.
An "if you exit now, your ship will self-destruct!" message could be one option, but that still doesn't take into account ALT-F4. So what else? Frontier could log anyone that disconnects during combat and keep a count, with a view to penalising repeat offenders maybe. Your ISP might fail, even frequently but if the majority of your disconnects coincide with being in battle, that's a bit fishy.
I don't think there is an easy, one-size-fits-all answer to this. Maybe a combo of "boom if quit" and "in-game fine if disconnected X times during combat"?