I have a hunch of the direct reason, but still no explanation why this has started happening.
My X11 session is "anchored" by an xfce4-panel. It looks like the offending XCreatePixmap call might be targetting a drawable that's owned by that panel process, e.g. to install the application icon in the panel's "window button". It would make sense to do this only if the 2 XDisplay strings are identical. That would explain why I can also avoid the error with DISPLAY=unix:0 (AFAIK that's equivalent to DISPLAY=:0). As I said, I still can't fathom why this worked before, and even less why it now works for a limited amount of time.