The silver cylinder sounds like it might be
battery isolator solenoid which make a distinctive click when they are energized.
On my rig that solenoid places my chassis and coach batteries in parallel whenever I turn on the ignition key or when I press the emergency start button. If this is a similar solenoid you might try and have someone press the emergency start switch when the rig is turn off and see if you hear the same click? Not sure why it would periodically click, might be loose wire, might be auto reset breaker in wire that energizes the solenoid.