A degenerating PDE system for phase transitions and damage