Interesting coincidence, yesterday I was using a similar article to hopefully fix kwin starting to slow down after 10+ days of uptime.
I noticed this myself, both gnome and kde. It turned out to be that leaving Firefox open for long periods of time caused this.
Hm, I've recently noticed kwin taking up what seems like way too much CPU at idle. Fedora with KDE. Happens on both X11 and Wayland with Wayland being worse and perceptibly slower.