You are absolutely correct, and the USB-C specification even has an entire appendix dedicated to the problem. The trick is to reduce the voltage difference until the plug is far enough that a spark is no longer an issue, which means placing an appropriately large capacitor at the Sink side.