1000 W Arduino dimmer
You need a transistor with much lower Ron. 1000W at 400V is 2.5A. Your transistor's Ron is .55 Ohm. That implies ~3W dissipated power, which is too much for a TO-220 package without a major heatsink.
You should use a transistor with an Ron in the 10-20mOhm range.