Please be aware of the Forum Rules of Conduct.
This is already possible. Winning a battle in an enemy capital can cause the escape of prisoners held by that realm. I have seen it happen at least once.