Tips for not burning out my Arduino Mega or catching something on fire when wiring a Prusa i3?
Polarity matters, sometimes. Be especially mindful of the wires from your power supply to the board, as getting those the wrong way around will definitely cause damage. Heated beds and extruders are not polarity sensitive, and can go in either way. Fans are polarized, but will probably survive if you get them backwards - they just won't run. Stepper motors don't care about polarity, flipping the connector around just makes them run backwards.
Take special care with endstops. The endstop connectors have 3 pins (VCC, 5V and signal), endstops with 2 pins are usually connect to GND and signal. Putting a 2-pin endstop across 5V and GND will destroy the 5V regulator.
A common cause of damage is wires not being clamped in their respective terminals properly. The offending wire will arc, melting and destroying the connector. Tighten down screw terminals properly, use proper crimps if you have them. Soldering the ends of wires going into screw terminals is not encouraged, but if you do solder the ends then make sure to check after a while and tighten the screws again.
Put the stepper drivers in the right way around.
For things like the heated bed and wires going to your power supply, use sufficiently thick wires. Especially with the heated bed, a lot of current flows through the wires and flimsy wires will heat up and melt.