Had to do this myself about 10 years ago.
A delay relay in my AC burned out and wouldn't allow the unit to shut the fan down. Shut the breaker off, went up, pulled the main fuse pack, pulled the cover, found the relay. Pretty much a burnt husk of plastic.
Looked at the wiring diagram inside and in my manual for the unit (it was built in the early 1970s, when full documentation for everything was pretty standard), just to double check everything along the way was still ok. It all looked ok, so I went online to find the part - and ran into the same issue. For a simple relay.
I wasn't going to pay several hundred dollars to someone to change out a relay. That's dumb.
So I got in contact with my local Burning Man community, and someone on there was an AC repairman. I let him know what I had found, and he set me up with an invoice to purchase the part at a local HVAC parts place. Got the part, installed it, and it hasn't been a problem since.
I can understand the reasoning of needing licensed professionals for certain things, but basic electro-mechanical repair of appliances shouldn't be one of them. It wasn't always this way, either; I'm not sure when it changed (probably sometime in the 1960s), but before then it was almost expected that a homeowner would do his or her own repairs and maintenance on their home.
That said - likely the change came about in part due to shoddy electrical work that you can almost always find on homes that haven't been renovated that were built before such rules and regulations went into effect...