Those links do not address the relevant issue. Yes, your TV can send sound out the optical port. But, what type of audio is the question. Most sets are designed so that they will output DD 5.1 from sources they acquire themselves, such as off air antennas and Smart TV apps. But, they will only send stereo from external sources using HDMI connections. As noted in my previous post, while some sets will pass through DD 5.1, almost none do DTS. TVs are 2 channel devices and they will use the HDMI handshake to tell the attached devices to send stereo instead of encoded multichannel sound.
Unfortunately, the LG manual doesn't address this issue. I didn't even see a setting for the type of digital audio output. If you have access to a receiver, you can connect the TV to the AVR and see what type of audio gets sent. Otherwise you may have to call LG and hope to get a CS tech who understands the question.
But, bottom line, it is unlikely your TV will send multichannel audio from HDMI inputs. Most don't.