Preferences about the best racking time vary just as fermentation behavior varies. A very active fermentation will ferment all the way dry in as little as 3 days sometimes. No worry about when to rack with those, they are fermented dry so fast there isn't really any time to rack it into a carboy.
Other fermentations are slow to start and go on for 2-3 weeks. In those cases racking the wine into a carboy at 1.020 or below might not be a problem - I say MIGHT NOT because sometimes the racking process seems to re-invigorate yeast and the next thing you know you have a foam fountain as mentioned. (Most undesirable, a big mess and a waste of wine.)
The biggest reason to rack before fermentation is finished is if the "CO2 Blanket" has faded away due to the slow ferment.
So if you are concerned about losing that CO2 Blanket, that's a reason to rack BUT be careful and I would personally recommend standing around and watching the wine for at least 30 minutes after racking. I suspect that the vast majority of those foam fountains occur that quickly - at least the two I've experienced did. One was with a wine SG of 1.018 and what appeared to be a slowing ferment. That wine had only been fermenting about 5 or 6 days - that should have been my clue to wait, but I rushed it.
As always your experiences may vary. Nowadays I like to wait until the wine is below 1.010 or lower - especially if it got there in less than a week.