I downloaded a copy of the
Toyota Wire Harness Repair Manual a while back. There's a lot of good info in there. You can identify part numbers for connectors as well as terminal sizes. In addition to that manual, if you didn't already know, nearly every electrical connector on these vehicles was made by either Sumitomo or Yazaki and those two brands are so similar that some terminals are interchangeable between either brands connectors.
The body harness can provide a ground connection through terminal 11. When operating normally, if controlling one of the rear windows from the driver's switch panel, both the ground and power are supplied by the driver's switch panel. Also when operating normally, if controlling one of the rear windows from the local switch for that window, the power goes through that local switch but the ground goes through the driver's switch panel. You need to replicate that ground. You can do that by bridging terminal 11 to terminals 12, 15, 16, and 17.
Cheers