A post in Lenovo's forum pointed towards the DMCUB firmware needing an update: https://forums.lenovo.com/t5/Fedora/drm-amdgpu-job-timedout-amdgpu-ERROR-ring-sdma0-timeout/m-p/5227959?page=1#6018762
I pulled the latest file from git and installed it as described there. After I did that, dmesg reported "[drm] Loading DMUB firmware via PSP: version=0x0400003C" (before, it was "version=0x0400002E") and I have not experienced a freeze in the last three weeks.
On July 6, I undid these changes, and then let dnf update to amd-gpu-firmware-20230625-151.fc38.noarch (from amd-gpu-firmware-20230515-150.fc38.noarch before). Afterwards, the DM(C)UB version was still 0x0400003C and the system continues to be stable.
So, from my point of view, this bug can be closed (I would do it myself but I am not sure what I should select as reason for closing).
(Ah, I forgot to undo the state change from when I was looking at the possible resolutions before I saved my comment. I guess it is closed now. :) Please feel free to set a more appropriate resolution, though.)