I had the mirror opposite problem. Had two devices putting out toslink and an audio device with one coax and one toslink input. I bought a cheap converter and it's perfect because I can switch between my two inputs and keep my digital signal path. From what I remember, it can convert in either direction.
https://www.amazon.com/gp/aw/d/B01N32C5GT?psc=1
Since the signal is never covered from digital to analog, it should be completely lossless.