Determine if wire in switch box is safe to re-purpose?
I bet that the 40V measurement is likely a "ghost voltage," which is a misleading reading that can show up as a side effect of using a digital voltmeter on a dead wire.  The misleading measurement happens because there is capacitive coupling when you have an un-energized wire running next to an energized one.  The impedance of the voltmeter itself causes the high voltage to register, though the current it is capable of delivering would be miniscule. In this case, it would be from the switched wire running next to the hot wire.

To determine whether or not the voltage is actually present and being fed from a true voltage source, rather than being a misleading reading of an induced voltage from an adjacent wire, you need a low-impedance voltmeter.  Fluke makes several.

Given that this is the only time I am likely ever going to need this test, I'm not going to purchase a dedicated low-impedance tester.  Instead of doing that I'm going to do a few brute-force tests.

We're going to start with the assumption that the red wire is likely connected to nothing other than the outlet.  Today, when the switch is closed, it sends connects the black wire to the red one and sends hot down the red wire.  

As far as we know, no other devices are connected to this switch.  If we shut off the circuit breaker, connect both ends of the red wire to ground, then turn it back on, the circuit breaker shouldn't trip.  If this is the case, measure the current from the red wire to ground on each side, and from the red wire to neutral and hot.  There shouldn't be any current flowing into or out of a dead wire, period.

Obviously, this was done at my own risk.  Current to ground came up with .001 mA.  Tied the red wire to neutral at the outlet, connected the smart switch, and works like a charm.