Isolation of ESC with optocoupler

MarkGoingToSpace:
I experimented a bit and got a setup that seems to work (see attachment).
Is this okay or is there somethin wrong with it?

Ah, good.

My last diagram should've worked then ?

In your diagram, when the transistor is on, the PWM pin is in the middle of 550ohm to +6V and 550ohm to GND.
So the PWM signal will only switch from GND to +3V max. That might only just be working.

Unfortunately the datasheet on the ESC give no information at all about the PWM input, it might have an internal pull-up which you have to 'override' with that low pull-down value of 550ohm.

Really needs looking at with a 'scope.

Yours,
TonyWilk