Existence of a solution for a thermoelectric model with several phase changes and a Carathéodory thermal conductivity