The server "X" does not have a valid connection for casting. Check that the server is claimed

I was able to solve my Chromecast-related problems following a hint from @tinu1212 in Fehlermeldung bei Verbindung von Plex Android App mit Chromecast

I just had to add “plex.direct” as an exception in my router’s “DNS rebinding protection”.

You can find some information regarding “DNS rebinding” issues in https://support.plex.tv/articles/206225077-how-to-use-secure-server-connections/

Exemplified, for my “Fritz!Box” router there is a German tutorial how to solve these issues at https://avm.de/service/fritzbox/fritzbox-7590/wissensdatenbank/publication/show/663_DNS-Auflosung-privater-IP-Adressen-nicht-moglich/