What about your people's readiness (and sworn loyalty) to stand or fall by their king? If your army routed leaving their king and father in the hands of the enemy they don't deserve ransoming back. I ransom the captured back only if they had performed deeds of valor against the enemy that was much stronger. In this case the returned troops are given the place of honor and garrison the capital where they can bask in the grace of the king.
And, what do you do with the ransomed troops? If you disband them then it is a sheer waste of money.
But another connected question: when you capture the enemy's king you are sometimes paid the ransom, and other times you are refused. Can you be sure that you will get your money or is it a random choice of the AI?
Bookmarks