I gave up and coded my own tool. To quote from its docs:
SYNOPSIS tracefile [-adefnu] command tracefile [-adefnu] -p pidOPTIONS -a List all files -d List only dirs -e List only existing files -f List only files -n List only non-existing files -p pid Trace process id -u List only files once
It only outputs the files so you do not need to deal with the output from strace
.
https://codeberg.org/tange/tangetools/src/branch/master/tracefile