Actually, there is a very good reason why that might not work for most people.
If your TSLA shares were purchased less than 12 months previous they are short-term holdings and get taxed at whatever tax bracket you are in. For many here, that would be 37% (the other common rates are 35%, 32% and 24%).
Let's say you could have sold shares purchased in May 2019 for $240 for $950 yesterday and you would be in the 35% tax bracket. You can't really use all of your gains to buy back today at a lower price because you need to withhold $248.50 per share sold to cover the capital gains tax that will be due for 2020 taxes. You would need to be able to buy back in at $701.50 in order to get the same number of shares after paying tax on your profits.
If you were able to do this (sell at $950 and buy the same number of shares back at $701.50), you would be in exactly the same financial position as had you simply held with one small difference. You would have raised your cost basis from $240/share to $701.50/share. That's the only benefit you would realize. Furthermore, this is a benefit that doesn't compound. In fact, if you eventually sell the shares at $6000 in your retirement, when you are taxed at a lower rate, the savings will seem almost insignificant.