That switch is the opposite of what you need. It's two inputs and 1 output. You need 1 output and 2 inputs.
Bluetooth is not great for use with video due to its very noticeable latency. I would avoid it for something like this if possible.
This looks like it would work, though I have no clue how good the quality is: https://www.amazon.com/EMK-Fiber-Optical-Splitter-Switch/dp/B07DLR2WJK/.
I think you're making your search for the perfect product a bit more difficult than it needs to be though. I would just mute/power-down the soundbar when using headphones.