Yeah I was smoking too much weed today and was pondering a bunch of nonsensical stuff unfortunately. Still I remember as a kid doing the electrolysis of water I was surprised how little energy it seemed to take compared to the volume of the gases produced. Since splitting H2O involves not only a chemical change but also phase change, there would be a transfer of heat energy between the molecules and the surrounding environment, in this case going from the environment into being absorbed by the molecules and exciting them into a gaseous state. So it’s not a closed system, outside energy (heat from the environment) would be introduced into it. Whether enough is gained to make a difference is probably questionable though.