you guys are once again looking for code solutions to people problems, but i do agree that at this point there should be mechanics to remove dukes from power.
my personal suggestion is to give rulers the ability to strip dukes of their title, but make it take time and give the duke a couple days' warning to give them the opportunity to secede or defect their duchy. if they are really inactive and unpopular the region lords will defect back to the original realm, if the ruler miscalculated he may have a real problem on his hands...
Isn't that already an option with banning him (except the royal thing)?