You could do that with a much simpler trailer, though. All you need is battery and a cable.
I don't know anything about electric trucks, but given that the standard use is to add trailers to them, I'd be surprised if "put the battery in the trailer" isn't already part of the plan.