From a technical (objective) standpoint, it is unlikely that the sound quality of WiiM's Bluetooth will surpass that of Toslink. But subjective sound quality is another story.
I am not sure if I understood your explanation, so let me check.
- WiiM > Optical > Soundbar
- TV > Opt > WiiM > Opt > Soundbar
- TV > HDMI > Soundbar
- WiiM > Bluetooth > Soundbar
Results.
- perfect sound quality
- low sound quality
- impressive sound quality
- very good sound quality
Therefore, is only "2" a problem for you?
I think that when comparing sound quality, surround effects, sound mode, volume, etc. all need to be matched. But I don't know under what circumstances you compared them. Leaving that aside, if only "2" is the problem, it could be that there is a problem with the optical cable.
It would be interesting to see if there is a difference in this case compared to 2.
5. TV > Opt > Soundbar
Also, if you have had no problems with the sound quality of "1", my suggestion would be to eliminate "2".
(Use HDMI to connect the TV to the soundbar and use optical cable to connect the WiiM to the soundbar. No connection between the TV and the WiiM.)