Straight.el is not using the autoloads cache.
docker build -t test .
docker run -it --rm test
emacs # the first run just gathers all the packages, feel free to exit after all done
strace -o /str-bug -e file emacs -f kill-emacs
sed -i '6039s/^/;/' /root/straight-b89c950.el
strace -o /str-nobug -e file emacs -f kill-emacs
grep request-autoloads /str-bug
grep request-autoloads /str-nobug
I'm not proposing to simply comment out line 6039, it's just a demonstration that that line is causing the issue.