Hi and welcome to Just Answer!
1. What type of gain? Ordinary or capital?
A gain on the disposition of section 1245 property is treated as ordinary income to the extent of depreciation allowed or allowable on the property.
Any gain recognized that is more than the part that is ordinary income from depreciation is a section 1231 gain.
It is taxed as ordinary income - because your Accumulated Depreciation is equal to the gain. If for instance, your gain were more than the accumulated depreciation amount - the difference would be a capital gain.
2. Can we defer the gain?
Yes - if the sale is structures as a section 1031 transaction
and another like-kind asset is purchased - for instance another Machinery.
3. Any depreciation recapture?
Yes - the full gain will be attributed to the depreciation recapture.
Let me know if you need any help.