My teacher taught me about this, first of this applies to some of his works not all, but there is a technique called PROLATIO in which for example the c minor prelude the beginning is played exactly half the tempo as the middle section marked presto which is two times the speed then the end is back at the original tempo. Another crazy thing I’ve heard is Benjamin Zander talking about playing the prelude in c Major twice as fast or faster because he believes the repeated broken chords was because the harpsichord did not sustain and so it acted as a sustain however with modern pianos the sustain is there and would make this far too murky. Many people have claimed they found the formula but it really depends on many things like the decay, the harmony, harmony rhythm, style, mood of the piece, voicings, it’s open to interpretation there’s even a pianist who doesn’t use any pedal in Bach to mimick the harpsichord style and uses his fingers only to sustain which is foolish since we can enhance the music with pedal. My teacher specialized in Bach studies and interpretation and Juilliard so that PROLATIO technique is where he learned it. Hope that helps