OK, then that is not the problem - I suppose, if you disconnect all the outputs to the FET's, your wiring still overheats? Could be the FET's that has a short between the Gate and the Source or Drain???
What value resistors are there on the switches?
Just disconnect the wire from the Sensor to A9? of the arduino and wire A9 the GND, just to see if it still overheat?
If you have a voltmeter, just check the voltage on the wire that is connected to A9. wire to ground, this must not be above 5v.
Apart from that, nothing looks suspect.
Obviously, the Mega could be faulty - when you see smoke, it normally means you are too late!!