You can disable the audio from your BIOS configuration; however, this means that that there will be no audio from the audio jack, HDMI or the mini-DP.
I have tested the behavior you mentioned, but the issue did no happen. I played a YouTube video, then plugged an iPhone earphones and they sounded just fine.
Try the following;
- Enter your BIOS setting, and press F9 to load defaults.
- Install the latest Audio driver, see here for it; Download Realtek ALC* Audio Driver for Intel® NUC Kits.
- Make sure that in your Playback Devices you select your headphones.