Conflicting Information Between Electrician and Home Inspector?
There are others who know the code better than I, but the code allows for some variation from the wall surface by up to a 1/4" max, and there are extensions that will help get past ones that are set too far in. That is a con play.

As far as the wires on the joists, it looks like your attic is not meant for storage. If not the wires can run on top of the joists that I am aware of. There is a requirement for space below rafters that help dictate the rule if the attic is usable for storage, let alone the sizing of the ceiling joists