Foreword
Anything "Auto" is not going to be the same on all images. So
- you can accept that images are going to be transformed differently. This can be a good thing in some cases.
- you want to apply the very same changes to all: you have to use an explicit/manual tool on the others (Levels/Curves...) but if you use an "auto" tool on the first, Gimp won't tell you exactly what it did to the first image. So in practice you have to forego the use of automated tools, and use Levels/Curves/Brightness-contrast on the first image.
With Gimp
Without using Gimp
This could also be done with a shell script built on ImageMagick. For instance, stretching the contrast can be as simple as!
magick convert input.jpg -normalize output.jpg
You can combine several operations into a single call, for instance, I create low-res images from my camera image with a single call:
convert "$f" -modulate 100,120 -geometry 3000 -sharpen 0x1.0 -quality 85 "$dir/$(basename "$f" .JPG).jpg"
This: 1) increases saturation, 2) resizes the image, 3) applies a bit of sharpening, and 4) saves the image with JPEG quality 85.