Hello Coromal,
This is is new to me, I have never seen anything like it previously in a caravan or motorhome. It raises a number of questions...
Based on the photos you have provided, it seems it's a piece of metal bar approx 20 mm x 40mm x 5mm with the appearance of aluminium.
It has two holes, one which has a nut and bolt securing a wire crimp connected to a purple wire.
The other hole is plain but has some device secured into it . The device seems to have a concentric construction with a central solder terminal. There is a on off white material surrounding the terminal filling in the space to tubular wall of the device. A red wire is connected to the devices terminal.
The construction of the device suggests it has an electrical function with its outer cylindrical case forming one of the electrical connections case . The size of it and the metal block also suggest its likely to get warm/hot when it does whatever it's designed to do.
My initial thoughts are is it a high power Diode, a thermal fuse , a temperature sensor, or even a lightning arrestor. For any of these functions it would almost certainly need to secured and protected to prevent accidental with any other wires or metallic parts.
I can't see any sort mounting or fixing for it, was it just floating on its wires?
Was it mounted or covered to prevent accidental contact with other wires or other metallic parts of the van?
Incidentally what make , model and year was the caravan?