Looks like the morning pic's with the fenced slab was modified from an original install that had transformers guarded by that fence originally? Even the meters that are there seem to post date the fence. (a few pole pigs on the ground as open transformers to much older metering if any ata all...) So low open wiring and workspace items in the first pic's should have been corrected then. Then pic 1+2 are clear violations and safety hazards....
Back to topic of compliance.... Around here from the inspectors, and my own personal opinion, is that existing conditions should be allowed only if installed in a method complying with code of its period of install. Obvious violations, and safety hazards get corrected. So as far as current code compliance, a line can be drawn, somewhere between "It was never allowed or to code", "Doesn't meet current usage", "Blatent safety hazard" and "Allowed to remain".
Pic 3, I'm assuming the meter on the right is a from a CT cabinet inside?
As far as the main on the outside, I see that as a mater of either prefferance, or local AHJ to decide, the latter being the decider to open that option. Is some situations it may not be wise to have the main disco accessible to people to shut off, like say at a bank or store where someone might want throw a switch to make robbing the joint easier. You could lock it, but a pair of bolt-cutters are easy remidy to that. That said, around here, unlike many other places, mains, and SE conductors can run a significate distance inside. This service if done in say an all-in-one cabinet would have driven the cost pretty far up due to making a pad for it and equipment cost. And maybe had a much longer down time over all, instead of 3 off, then one off...
PVC for SE conductorsor outdoors is not allowed here.
352.30 has some contraditions to wording IMO
shall be fastened so that movement from thermal expansion or contraction is permitted. RNC shall be securely fastened and supported in accordance with 352.30(A) and (B).
Loosely securely fastened?
PVC IMO was a bad choice for SE conductors, I really don't see much wrong with it otherwise....