Buying club will try to avoid it, but it can be done (unless the buying club is Barcelona, Real, Bayern or PSG). Buy-back fee is set higher, so it means reasonable profit in such scenario. It's mostly time limited (e.g. 2 years to activate, after which you can't use it anymore). If you have a lot of clubs interested, go to the one which would accept such a deal. You can sell a little below market value to the club that's interested, etc...
As for Martial, rumours are that he is interested mostly in playing time, so maybe he won't mind it. Also, 2 years remaining on the current contract is not a bad bargaining chip.
This is all rumours at this phase, he may end up signing a new deal, but if things do go the other way, we should try it imo. We did it with Depay and Januzaj in the end, both being less talented.