I have now filed a bug with hyperbole https://github.com/rswgnu/hyperbole/issues/518, as disabling that package seems to stop the hangs. Not 100% sure if it's their bug or cc-mode now, but I haven't been able to trigger the behaviour since then.