As @renojim mentions, no current Roku player has an optical output. The last model with one was the Ultra 4640, which is not a 5 year old device.
Yes, you can connect an optical cable from your TV to a receiver to get all audio (TV and any device connected to the TV) to the AVR. However, not every TV will passthrough 5.1 audio from a connected device. I know of no definitive list of such TVs. They will provide 5.1 audio from OTA broadcasts and any internal apps (assuming it's a Smart TV), but not from a connected device. If it won't passthrough 5.1, all you will be able to get is stereo sound. Even if the TV does passthrough the audio from the Roku, it won't passthrough Dolby Digital+ with Atmos (if that's important to you). Some TVs won't pass DD+ at all, and again you'd be stuck with 2 channel stereo since most online streaming providers now use DD+ as their default audio codec.
The best way to use an external audio amplifier is to use one that has HDMI jacks, so you can connect your Roku (and every other playback device) directly to the AVR for best possible audio. By definition an AVR has audio/visual jacks, but depending on its age it might not have HDMI jacks.
Also, if you have a 4K TV and a 4K Roku, you have to make sure your AVR supports 4K and HDR/HLG/Dolby Vision if your TV supports those options. Virtually every new 4K TV supports HDR10, and some also support HLG and DV. LG is one of the best for supporting them all. Samsung does not support DV. I only offer that comment because just because an AVR says it's 4K compatible doesn't mean it supports DV or HLG, and possibly even basic HDR.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee, just another user.