Nomenclature for sidecars on is conflict-prone.
Currently, if the database contains multiple versions of an image 'IMAGE.ext', the corresponding sidecars are named 'IMAGE.ext.xmp', 'IMAGE_01.ext.xmp', 'IMAGE_02.ext.xmp', and so on.
This has the potential for conflict if there is another image named, e.g., 'IMAGE_01.ext' in the same directory.
If the numeric part were moved after the extension (e.g., 'IMAGE.ext.01.xmp', 'IMAGE.ext.02.xmp', ...) this potential conflict would be eliminated.
While the hood is off, it should also be verified that Darktable can correctly handle the case where one image has more than 100 versions.