The other path of allowing longer filenames is harder to achieve, you’d have to fork the Arduino-ESP32 core, possible recompiling the ESP-IDF base with a configuration change and the mkspiffs tool.
Maybe LitteFS has different limitations? Try that filesystem instead
https://docs.platformio.org/en/latest/platforms/espressif32.html#uploading-files-to-file-system