A panic that you are encountering with the trackpad connected maybe a RAM issue, not in the way you're thinking! The memory stack is driven by a set load order of the OS and the needed drivers. So when the trackpad is not installed you are leaving a void so that could be why it works. That would be a bad chip or more likely a cold solder joint on one of RAM chips or the PCH chip the RAM connects to.