As for the images of the burnt carriage, its impossible to say what caused this? But there are few possibilities... Over heating decoder due to it having insufficient air flow - Its been wrapped in insulating tape or shrunk down heat shrink tubing. The decoders components have over heated due a fault after the decoder. The PCB of the carriage or loco has defective components or they have failed or have been subjected to an overload. The decoder was installed incorrectly and a partial short circuit has become present allowing larger currents to flow causing overheating.
But of course none of this will return the carriage or loco to its original condition.
But what should be learnt is that with DCC large currents can flow under fault conditions than ever seen with DC.
Generally on DC the maximum current is around 1.0Amp on DCC this can be 4 or 5 Amps or more depending on the DCC system used. in the USA some DCC users will often have 10 Amp systems. Consider this....Typical DC = 12 volts at 1.0 amp is equal to 12 watts. On DCC 4 Amps at 15 volts is roughly 60watts, while 10Amps at 15 volts is 150Watts.
60 watts is very hot. Consider a conventional filament lamp rated at 60 watts. Its extremely hot! In fact don't touch such a lamp when lit, it will probably burn you!