As far as I know, the RPi cannot decode h.265 videos. I've tried to watch h.265 videos on my TV by connecting an external hdd and it was working without problems. So is it possible to use the TV as a client? So the TV would be doing the decoding work?
The short answer is no. This is fundamentally not how Plex works. Plex's operating model defines that the server, whatever device that is, does all the encoding on its end. When a device, (phone/TV application/Kodi/whatever) makes a request, it decides what the best settings for that device is an encodes it for that specific device. The client then simply displays what it's given without editing it in any way.
The Raspberry Pi Zero can theoretically be used as a USB device in a manner you are suggesting, but it has not yet been made functional. If you did magically manage to get that working, you'd then need to fundamentally change how Plex works. Since it's a closed source application... good luck with that.
You need the right tool for the job. In this case, that means a more powerful computer to run Plex Server, and use the RPi as a streaming client. Alternatively, you could pre-encode everything on your desktop computer and then place it on the RPi if you really want to use it as a server for some reason.