Rescuezilla 2.5 is a handy tool to have around, even if you are lucky and you never need it. The new version is based on the latest Ubuntu 24.04, updates several of its components, and also includes a new and experimental command-line interface.
exiftool -r '-FileName<IMG_${FileIndex}%c.%e' DIR