Electromagnetic heating of minor planets in the early solar system