I don't think this is just a KDE issue as I'm having it on gnome too. Not sure how to fix. I feel like it happens less when I close all background processes before shutting down but idk.
KDE
KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.
Plasma 6 Bugs
If you encounter a bug, proceed to https://bugs.kde.org/, check whether it has been reported.
If it hasn't, report it yourself.
PLEASE THINK CAREFULLY BEFORE POSTING HERE.
Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.
It might be due to display drivers not playing nice on wayland; I've had this problem a couple months ago on arch with the amdgpu drivers, using either one of sway, labwc, or KDE. It did not happen on Xfce, though; and after a kernel update the problem subsided.
Btw Months ago.... At that time it wasn't that long ago that the big DE's started to implement wayland in the first place to get rid of xorg. In the meantime, wayland is running pretty well.
FYI I've had this issue on my old XFCE laptop for a while, and I'm still using X there. I thought it was a sign of failing hardware, given that it happens at the very last point of shutdown (and also, if the system was going into hibernation, it wakes up from it successfully even though I had to force poweroff the machine).
You say that even automount causes problems. You should look for a backup HDD before data loss. You should read out the SMART values.
Either way, disconnect the external HDD from the PC and check whether shutdown still causes problems. At least I know the problem myself from problems with external storage.
Either way, you can only guess without any information. Logs would be more helpful.
(systemd-analyze blame)
journalctl -b -1
systemctl --type=mount --all
systemctl --type=service --all |grep running