In this case the contractors all refused the work. Within their rights, but if the city requires licensed contractors be used to do some work, and then they refuse or don't exist... Yeah, he had a winner.

Well, that's not exactly correct now is it.

HO knew full well that he was not permitted to do the work himself-

Quote: I did the wiring for my new house without either a permit (the code office would not give them to unlicensed people)

I'm sure at that point he could have had his pick of contractors but the HO's intent was never to have a contractor do the work to begin with. No contractor ever refused.

Knowing full well that he could not do the work himself, he thumbed his nose at the law and went ahead and did it anyway.

Now, the house is finished and the HO wants a C of O.

So:

the AHJ refuses to inspect unless all the work is removed and installed by a licensed professional, and no licensed professional willing to go against the inspector.

I think it's a bit erroneous to say that "no licensed professional [is] willing to go against the inspector". More accurately, no licensed professional wanted the liability for signing off on work like this.

As for [the] work is inspected so there is no public safety issue that requires a licensed professional that doesn't hold water either.

Most importantly, the work can't be inspected fully as would normaly occur because the walls are closed up.

Further, inspection never guarantees that the work is safe, only that as far as the inspector can determine the installation meets the NEC and other applicable codes. There is a certain amount of trust given the EC by the inspector. Being a licensed professional means that you will do your best to both know the code and apply it. An inspector can't see everything and by being a professional it is given that you have the training and experience to do the job correctly. This basic principle doesn't apply with a HO doing the work.

requiring the existing work to be removed is unreasonable

Well, maybe but I don't consider it unreasonable to require all walls and ceilings to be removed to allow inspection. At that point I can't see not being able to find an EC to take whatever steps are necessary to insure code compliance and pass inspection.

At this point a wise AHJ issues a permit to the homeowner, offers to pay legal fees and a lot of money to keep the whole thing quite.

An I've got a bridge I want to sell you!

-Hal