Just get one of these in the length you need. Better than glass.
https://btpa.com/TOSLINK-XXX.html
If you are really worried about degradation, put a reclocker like the Synchro-Mesh in-line. Then its a don't care. The reclocker will also provide galvanic isolation as well as upsampling to 24/96.
Always use at least 1.25m length for coax:
Steve N.
Empirical Audio