Generally this kind of failure was a couple hundred dollar fix. Pull the compressor, braze on a new one, flush the system, vacuum it down, and refill.
Only now, the refrigerant can cost a grand, the markup on a $200 Emerson scroll is 4x, the fact that you need a license to work on the system means the tech charges $200 an hour, and it all adds up toe selling someone a new system, that is likely going to last 1/2 as long because R410 runs at 2-3x the pressure, the major manufactures have penny pinched every gram of metal out of the condenser/compressor tubing so its as thin as possible, and a half dozen other factors means that the 30 years a good R22 system would run for is unheard of now.