Every SHH agreement I have ever reviewed called for sale of stock in certain situations, such as death. A stock purchase is economically analogous to an asset purchase without the write-offs. So thinking outside the proverbial box, the agreement should allow the survivor an assignable option to purchase assets instead (or a stock sale with a 336(e) election) so long as the decedent gets the same amount.
For example, 50% SHH A dies with SHH Agmt calling for a $1.5M cross purchase or redemption. SHH B with 50% declares he is holding $1.5M, his 50% and the option as trustee fbo an unrelated person for 1239 purposes. The trust forms an S corporation to be the buyer and a QSST election is made. A 338(h)(10) with the decedent's estate and SHH B is done at a $3M price. S and QSSUB elections are made.
Assuming all $3m is allocated to goodwill, the net effect is $3M of additional deductions at the cost of $1.5M of gain for SHH B. The down payment and timing of gain can usually be deferred via an installment sale. The income tax savings from the deductions are, say, $1,200k, and the tax on SHH B is, say, $300k, for a net tax savings of $900k, which is 60% of the price paid to SHH A. WOW!