Is depreciation on parts I replaced before selling still recaptured?
No, if the old part was disposed of for tax purposes before the sale. Recapture applies only to gain, and a part you remove and discard has no sale price, so depreciation taken on it is not recaptured. When an asset is retired this way, its depreciation stops and any remaining basis is written off as a loss.
The catch is what counts as the asset. A building and its structural components are one asset, so for an old roof, siding or HVAC system you get this result only by making a partial disposition election on the return for the year you replace it. Without it, the old part stays in the building's basis and keeps being depreciated, and that depreciation is taxed at up to 25% when you sell. Items a study lists outside the building, such as carpet or appliances, are figured on the facts. The election does not help at the final sale, because the whole property is disposed of then.
Learn more: One-pager: you did a cost seg, now you want to sell · Explainer: what happens when you sell
Source: 26 U.S.C. 1245(a) and (b), recapture on section 1245 property and its exceptions · 26 U.S.C. 1250(a), (b) and (d), additional depreciation and exceptions · Treas. Reg. 1.168(i)-8(c)(4), (d) and (e), dispositions, partial disposition election and abandonment loss
General information, not tax advice. Tax law changes, and the right answer for your return depends on your facts.