After pretty much having given up, @Pixaro managed to spark my interest again yesterday and after a troubleshooting session I finally managed to resolve my specific issue. I first tried it on my testing machine in Azure and then when it seemed to work, I applied the fix to my freenas box.
After adding the variable kern.ipc.somaxconn with the value 2048 and the type sysctl in tunables under System in FreeNAS and restarting PMS 1.18.4.2171 it actually started working. No more Transcoder errors in the web client. I’ve tested it extensively and everything seems to work just fine now. Quite the load off my shoulders. I actually considered switching to Emby or Jellyfin when I was at my most desperate. Really didn’t like it very much though. I’m glad I “persevered”.
Huge thanks to @Pixaro for keeping at it, when I ran out of patience.