Just from the wording, ignoring the numbers, this looks like the control connection (red +5v,black ground and the last one signal).
From your description is guess this connects to the boiler on a dedicated port which provides the DC and reads the signal. 5v is quite common for sensors so that doesn't seem off.
The bankruptcy scenario is correct but the first part isn't: you don't have X shares as collateral that you can liquidate. Instead, you have collateral to cover sum Y.
As long as the collateral contract covers enough stock positions the bank won't lose.
That said all of this is assuming standard contracts. If y bank wrote "0% interest and instead 50% of the revenue growth of Twitter" then this would be an easy way to lose money.
Haven't heard of a stupid banker yet, though, so what would the chances be?