AFK Mining can be a problem, yes, but it can also be a reliable source of mineral income when you are, say, running a sector with stations of your own, and you have plans to create an empire of sorts (which in the current state of the game, is really hard to do). However, before we can even THINK about running sectors and having proper player-factions, we could always have a short-term solution.
The short-term solution I propose is that these ships will mine only if the player THAT OWNS THEM is online, otherwise they will go in a pseudo-idle state, which they will return to normal mining when the player logs back on. This encourages players to do something else while these ships mine, but at the same time discourages AFK mining (especially when paired with a timer that kicks players from the server if they are AFK too long) significantly, not to mention said ships are even more vulnerable to pirate/hostile attacks.