Yes, no.
They are doing three different things.
-
The digital write HIGH just kills the PWM signal to the servo.
-
The analog write potY sets up a PWM signal according to the unmapped value
And
- the escsolOn.write(pwmOutputY) is using the servo library and results in the mapped value being used for PWM, but you don't see it explicitly because you use a library.
So the first is useless, the second is wrong and the third is what (and all!) you need.
In all cases of an attached object like a servo, it is usual to talk to it through, and only through, the mechanisms that are offered in the library you are using.
HTH and good luck!
a7