They should just have an auto kick/replace on it. E.g. design a contribution algorithm to all the content in the dungeon. E.g. say there's a trash pack of 4 mobs. If someone stands there and does nothing for that trash pack they get a contribution value of 0, and those that generated enimity (tanking/healing/dps) get a contribution value of 1. If someone gets a 0, give them an onscreen warning (Your contribution was 0, 4 more and you will be kicked). Then if they are still afk for 4, kick them and bring in someone else.

Secondly I think if someone gets kicked or leaves, the dungeon should be scaled to match. Sometimes people leave and no one joins back because people uncheck the join runs in progress box. So if a DPS leaves and it's a 4 dps dungeon, then the bosses and trash should have their HP scaled down my 25% or so to allow the run to succeed with 7 people, 3 dps 2 tanks 2 healers. If a healer leves then stuff should do less dmg. The second someone joins, it should be unscaled. Optionally they could give the group buffs to compensate call it the "Man Down Buff" and have it stack for each person missing. Healers get more healing power, tanks get hp buff/enimity buff, dps gets dmg multiplier. They would need to balance this on a tight rope.