Is this correct?
Sell PURCHASE to who? The buyback price for PURCHASE is updated with each dividend payment. If you intend to sell just before the SELLING dividend, you might as well buy only MINING, collect its dividends and then sell just before a difficulty change.
That would still be a risky strategy, as the price of MINING does fluctuate between difficulty adjustments, typically a gradual downward trend (though upward spikes also occur).
I don't really see where the 'guaranteed profit' comes from.
The price would not be the buyback price, but slightly lower. I see price dips where someone sold just under PURCHASE price.