Sorry for the delay. This is a great question. If you rent the machine, your initial cost outlay would be much less than if you purchased it, and you may write off the cost of the rent on your Schedule C, along with any associated expenses (such as gas, oil, etc)
However, if you purchase the machine, then you too might be able to generate income by renting this machine out to others. Since you stated that you can't sell it for $80,000 you might find that once you add up all the rental income over a period of time that your income from renting it may very well exceed the cost you could have gotten had you sold it.
As long as you own the machine and either use it in your business or lease it out, you will still be able to depreciate the machine. You will also be able to claim any expenses associated with repairing the machine and in keeping it in good running order.
You may deduct any costs associated with advertising the rental of the machine.
If you have a flat bed trailer that you use to haul the excavator from job to job, even for rentals, you may depreciate the cost of the trailer, and you may also deduct the standard mileage rate if you haul it to more than 1 place a day.
If you have a loan on the excavator, the interest you pay on that loan would be considered business interest and would be fully deductible on Schedule C.
So, if you think that you will only use the machinery for this one job, then leasing it might be a smart move, but if you think that you might actually find a market to lease it to others, then that may prove more profitable in the long run.
I hope this has given you some new information to think about.