There's a thousand non-contact ways of doing this...

Why not just have a Barcode on a plate on the back of the Trailer which is scanned from inside the cab?

An iButton powered by RF tuned circuit or inductive loop?

There's lots of ways where the target (trailer) can have a device attached which can be powered by the source (cab) without the nescessity of any contact wiring.

But there's also lots of ways of reading Data from a distance without the target being powered in any shape or form anyway (ie like a Barcode, or Optical Character Recognition etc etc).