All the switches in this series except the one in this review actually have two separate boards inside with a PCIe-over-cable connection between them. For example the SN2700 here (the sleeved cable in the third photo; you can't see the connector from the angle it's taken from):
https://ipng.ch/s/articles/2023/11/11/mellanox-sn2700.html
The cable has a SAS (SFF-8087) connector on each end. I bet you can replace it with an SFF-8087-to-Oculink cable:
https://www.amazon.com/chenyang-SFF-8611-SFF-8087-PCI-Expres...
and a PCIe-to-oculink card like one of these:
https://www.amazon.com/Ableconn-PEX-OL153-OCuLink-SFF-8612-A...
(none of the links are affiliate links)