Preventing the YouTube app from opening from Safari

I’m leaving a breadcrumb here in case anyone wants to research this question further.

The source of the problem is Apple’s Universal Links “feature”. This feature causes regular links to places like YouTube to open in an associated app instead of in Safari.

I’m running into this unwanted behavior on a Mac, and I haven’t found a great solution for it there, either.