How to share common ground between an Arduino Mega and Wemos D1 Mini?

But I would expect with a broken circuit to get nothing

No you have in effect a floating input signal that is subject to interference. The biggest, but not the only source of interference, is the signal from the other Arduino, hence it will work some time but it will give you rubbish.