I got same idea as yours to run RetroArch to record Steam time while playing roms. Found a way how to do it. It's a little 'dirty' method, but this is something.
All you need to do is edit .sh configs EmuDeck uses for launching emulators. In my case I will do it for PCSX2, but it will work with other. I noticed, that imported rom via Steam ROM Manager have launch target set as .sh script (in PCSX2 case it's pcsx2-qt.sh).
So, go to Desktop Mode (Steam ▶ Power ▶ Switch to Desktop)
Next, go to /home/deck/Emulation/tools/launchers and open pcsx2-qt.sh file with Kate or KWrite.
After #!/bin/bash line add this line: