Yes, you are right, definitely interspecific affiliative behaviour occurs between baboons and chimpanzees in the wild.
I remember when I read a few books by Jane Goodall a long time ago and there were several examples of strong bonds between infant chimps and baboons and even adult individuals mentioned in these, however, there were also cases mentioned of incidents of interspecific aggression that led to predation of infant baboons by chimpanzees.
I agree, as you rightly say though these kinds of affiliative behaviours may occur in the wild between these two species it is unlikely that they would within the restricted space of captivity.
It’s interesting what interspecific interactions occur in captivity, especially between species which wouldn’t encounter each other in the wild.
Auckland Zoo once had a Jaguar exhibit next to their Chacma baboon exhibit. The Jaguar would stalk them through the bars, while the male baboons would posture and bark at him. The keepers commented the baboons weren’t unduly stressed; and it actually provided enrichment for both species.
If a chimpanzee mixed species exhibit cannot be achieved, it’s interesting to think (bearing in mind the example of the Jaguar and Chacma baboon), which species they’d enjoy watching/interacting with.