@lpinney motors (all of them) generate heat from being powered up.... BUT they cool off when moving due to air flow past the moving parts.
unfortunately if they stop moving the heat cannot dissipate and they heat up.... a problem with this is that the hotter they get the lower the coil resistance, more heat = lower ohms = more heat = lower ohms etc etc... otherwise known as thermal runaway.
ok so that explains the over heating... now its simply(???) a case of why has it stopped turning... something jamming it? friction or foreign matter in the extruder feed/ gearing?....
the flattened filament is probably simply due to the overheat which coupled with no movement causes heat deformation.
likely causes are blockages, foreign matter in the motor/ extruder interface (good posh word that is) or an underpowered motor.....
good luck with the search