The exec() function is limited by its maxBuffer parameter. It does not seem to be affected by larger memory allocations after a certain point, so it results in a buffer out of range fatal error if too many images are sent to exiftool, or if the images have lots of extra binary data, like large preview/thumbnail metadata.
Use the spawn() function to execute the exiftool command so it is not constrained by the memory limit of exec() buffer size.