You could make it so only heroes who log off inside their HQ are present when offline, and available to defend the base. You could also mabye add 1 room that if players log off in they do not defend the base, mabye have the heroes shown, but in tubes(storywise each player could decide if the tube was suspended animation, a recharging area, or some kind of rejuvination tube). This way if a player logs off anywere in the city, they are not available to defend the base, and when they log on they won't disapear from inside the base, since they were never there.
I think xp debt is a good risk for being able to defend your base, but I think if you get full debt per death you should also get xp for kills. If your hero dies defending the base your hero doesn't re-apear until you log on again.