How to configure a Trackpad to connect automatically to two different Macs?
Unless your device can handle multiple connections, the answer is no.

Whether it's a Bluetooth track pad or one with a receiver (like Logitech unifying receiver), you can only have as many connections as the "memory" in the device will allow.  Most mice/keyboards/track pads are 1:1 devices.