Would it be possible for the WAV headers to include the device ID? Or even better, user customisable fields. At present they are not used to the extent that they could be.
Not exactly what you are asking for - but you can use Advanced Renamer to add text from the wave file Comment field (ICMT sub-chunk) to the individual filenames or rename the folder based on data from the first file in the folder.
eg rename folder to "AudioMoth_0123456789ABCDEF".
I can add details if it would be useful.
The WAV headers do include a few tags in every recording. On MacOS you can right-click a WAV file, and goto 'Get Info'. The tags appear in the comments section. On Windows it is harder to see the comments, but you can use Audacity to view them, or a simple HEX editor (picture below).