This is more of a WordPress question than a Roots question, really, but you could look at programmatically importing the images into WordPress, so that the camera isn’t involved in displaying the images.
I would be a bit cautious about importing all the images in WordPress, especially if the camera updates the image very frequently and/or the code that imports the image is called a lot (like on page load). Unless you actually want a media library full of every image retrieved from the cameras, it could be a bit of a headache later…
It sounds like all you really is a URL mask for each camera, so you could even do this at the server level with mod_rewrite or whatever URL rewriting library is appropriate to your server.
If the camera IP addresses don’t need to be editable by normal WordPress users, you could even create individual rules for each camera in your .htaccess file (assuming you use Apache).
Your fetch.php could contain the code you posted originally with a switch statement for each camera. You could save the file locally or simply stream it out to the user. Just make sure you set the appropriate HTTP headers for an image and also set whatever caching you want for your “image”.
PS: I didn’t actually test the above mod_rewrite rules and it’s not my strong point but hopefully it gives you a starting point.
I don’t have that much experience with Nginx but if you’re doing a straight proxy, maybe you will need an encrypted reverse proxy, unless unless Nginx automatically will fetch it from HTTP and then encrypt it to send to the client via HTTPS. I really don’t know but you could always try the simplest version.
If you were to use PHP via file_get_contents(), the image would be fetched internally by the server and then if you streamed it back to the client, I think that would encrypt it if you had a secure connection already. However, it’s probably much less efficient to pass the data through PHP so I’d try the Nginx solution first.