You can also read up here and here.
Getting ArduPilot to run on an esp32 has been an ongoing endeavour for some time now with limited success so far.
That’s why Dave suggested to go with an existing and established flight controller to get your boat running.
And you didn’t answer his question: why do you want to use an esp32?
Do you want to tinker with an esp and ArduPilot is a good excuse or do you want your sailboat to be autonomous in a reasonable amount of time?