I'd put my money down on UF being the non-metallic cable assembly.
Is it grey?
Kind of flat?
Temporary hook-ups are limited to 90-days, by NEC.
Under no circumstances would a multi-year run -- under any guise be considered Code worthy.
Everythings okay -- until it isn't and the lawsuits start flying.
If the distance is not too great, an overhead triplex run, supported by a messenger wire, would be installed. ( Don't forget a bonding/grounding conductor, too.)
The cheesy hook-up back at the source has to go.
Get a real electrician out there.
With that set-up, you should have a rodent invasion with the next bad weather.