So, this circuit diagram shows a resistor to protect the input LED. Does it also need a resistor to protect the output LED?If switching the Ground-side is not practical for your application,
use a Photo-Voltaic-Gate-Driver as shown below.
This works with High-Side, or Low-Side, Control equally well, no P-Channel required.
But, the Photo-Voltaic-type-Gate-Drivers can not be used for "High-Speed-Switching"
as they are somewhat "slow", ( several Milli-Seconds, depending upon the specs of the FET used ).
.
.
.
View attachment 324158.