M350 X16 Y16 Z16:16 E16 I1 ; configure microstepping with interpolation M92 X100.00 Y100.00 Z400.00:400.00 E830.00 ; set steps per mm M566 X900.00 Y900.00 Z18.00:18.00 E300.00 ; set maximum instantaneous speed changes (mm/min) M203 X30000.00 Y30000.00 Z3000.00:3000.00 E6000.00 ; set maximum speeds (mm/min) M201 X5000.00 Y5000.00 Z100.00:100.00 E1000.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800:800 E1200 I30 ; set motor currents (mA) and motor idle factor in per cent

In this section you need to remove the second value for the Z axis. The values are applied to the entire axis and not individual motors so you only need one value.

M208 X23.5 Y20 Z0 S1 ; set axis minima

How did you determine these values for the minima? This says that when the endstop is triggered, the nozzle is still 20mm within the printable area. This doesn't seem right. This may explain why it's smashing into the left side. If the nozzle is actually 20mm off the bed surface, these minima values should be negative.

M208 X300 Y300 Z350 S0

This says your bed size is 300x300 but your homing moves are only 250mm. Make sure that all of your homing moves are longer than the actual size of the axis to ensure they actually hit.

; home X G1 H1 X5 F1200 ; move slowly away

That definitely should not be an H1 move. If you're trying to move the axis away from the endstop before it is homed, use H2.

G1 H1 X-10 F3000 ; move to X axis endstop once more (second pass) G1 X10 F1200 ; go back a few mm

When using sensorless homing the second pass is not needed. Best to just remove it.

; Probe 2-point M401 ; Deploy probe - deployprobe.g G30 P0 X220 Y150 Z-9999 ; Front Right G30 P1 X0 Y150 Z-9999 ; Front Left M402 ; Retract Probe - retractprobe.g

You don't need to manually control the pin with M401 and M402. That's handled automatically.