Perhaps if we added a system where judges could pay the ransom for nobles of their realm,
Yes, I just had the same idea. This would solve the griefer issue, because you can't decide to keep the enemy in prison just for fun. If the ransom is paid, he's free.
We'd need to modify our ransom calculations some, but as I said, this whole thing would be fairly easy to code.