Equipment that is no longer used/servicable that is essentially "lost in the weeds" or left by road, dead is removed from balance sheet by reversal of original costs and depreciation.
No proceeds, fully depreciated. Debit all accumulated depreciation and credit the fixed asset.
The loan was simply borrowed money and the only changes to loans are principal reduction or write-off. Once you initially borrowed against the property to buy equipment you bought equipment and increased debt against property.
Sale of property is the most important journal entry and the reversal of the equipment can be tagged onto it but any action on loan will be tied to sale of property alone and not equipment