Hi Ethan,
I've done a lot of work on my granddaughter's Switch, but haven't had any need to get into the dock so far.
But I'm curious; did you narrow it down to the ribbon cable itself, or is there a possibility that the port itself is at fault? It appears both of them are available as aftermarket replacement parts, so the obvious fix for either one being bad would be to replace it.
[link|https://www.amazon.com/Type-c-Connector-Cable-Nintendo-Switch/dp/B07D8DRQ1J|Amazon.com: Type-c Port Connector HDMI Connector Port Flex Cable for Nintend Switch NS Dock : Video Games|new_window=true]
[link|https://www.amazon.com/Replacement-Charging-Nintendo-Console-Connector/dp/B07FR6ZL5Y|Amazon.com: Replacement HDMI Dock Charging Port for Nintendo Switch NS Console Charging Port HDMI Dock Switch Type-C Connector Socket Parts : Video Games|new_window=true]