syncing slideshow with music
Just some ideas.

1. Do not sync everything.

Define what out of sync is acceptable to you. Let's say 1/10 sec. (I would be way less "picky" and go for let's say 1/5)

Then calculate how many images you need to accumulate that out of sync, and only adjust that. This will be now adjusting only let's say one of every 10 clips.

2. Choose a "multiple" framerate

To reduce even more the out of sync, and retime later. Let's say you choose a framerate of 10x faster, then the out of framing could be rounded a bit more accurately. 279 frames. Then retime.