Xenon is on target.
Short of replacing the boards with new combo boards the 40 pin is a trouble spot and you will be chasing ghosts.
I would separate the 2 boards and reconnect and see if anything changes. Most of the time you can look at the female side and see they have lost tension. If it does change symptoms that will just show you have a problem. Even if everything starts working correctly it's not fixed, just delayed until it starts acting up again.