Southern city crammed with more than 1mn displaced Gazans is also the stronghold for Hamas’s remaining forces