It looks like you have M558 in your config twice.
You don't need to use M401 and M402 before the G30. The duet will deploy and retract as needed.
You don't need to add dwell commands the motion should be complete before the next move but if you want to ensure everything has moved before going on to the next command you can use M400 to clear the movement buffer before proceeding.
Not related to the probe, but I noticed your microsteps are set to 256 for X Y and Z which is very high. I'd be curious if you get any hiccups with them set so high. 16x with interpolation is probably a better bet for the motion axis. But I don't know the rest of your setup. The one axis where higher microstepping might help is the extruder but you have that set to 16.