I could not take "only BPMs that divide perfectly into so many frames per beat" as an answer. Nor could I tolerate the non-mathematical method of just following the waveform's peaks. So I updated my simple BPM-to-FPS-to-BPM calculator to make suggestions as to how to nudge animations back into sync with (most) BPMs.
The BPM to Frames Per Beat (FPB) part, if given a BPM that doesn't divide perfectly into an FPB, will suggest one of two compromises: either adding or removing frames after a certain number of whole-frame beats in order to nudge it back in sync; or how much to multiply the playback rate of audio to make it a whole-frame divisible BPM, stating the difference in BPM too.
You can discover more tempos to work with by putting non-integers or thirds into the "frames per beat" cell to figure out good compromises between changing the speed of a song slightly, and adding an extra frame every few beats. Most songs will sound weird after sped up/down just a few BPM. But, if you can find a change of 0.6060606 BPM, and you only have to add an extra inbetween every few beats, that's a compromise! Better than just putting down frame numbers on the waveform timeline anyway.
I hope it's useful to you. Incredibly niche and technical, I know.