To answer your question, it depends on the make of your tow vehicle.
If you have a RAM or GM product then yes, the battery in the trailer is directly connected to the battery in the vehicle and the trailer can run the trucks battery down.
If you have a Ford product then there is a relay that separates the two batterys when the vehicle is not running so one will not drag down the other.
The 40A line is somewhat current regulated just by having too small a wire to provide that much current. If the trailers battery were flat dead or shorted then it may blow a fuse in the truck - but that is the exception. Normal charging from the truck wont go near 40A because of the wire size.
There is also usually a breaker in the trailer that limits current draw (but not always).