How about this?
Buyouts take 5-10 seconds to process. (same as selling stock)
If only one person clicks buyout, they get the company. All the Structures/Base, none of the Cash/Resources/Debt. Just like it works now.
If multiple people click buyout, the buyout goes to auction. Players can bid normally, including purchase by debt. The proceeds of the auction are split according to % of stock owned.
A owns 90% of B. B is trading for $0.01. C swoops in and clicks buyout on B. A responds by also clicking buy out on B within the 5-10 second window. A and C bid over the auction. C wins the auction, paying 1m, and gets the company. A gets a 900k payout.
If A had won the auction, they should only pay for the last 10% of B they did not own. Otherwise they could convert debt to cash when they get paid out on their 9 shares.
B should be prevented from bidding on his own buyout auction.