Yeah I think that would work if the correct diode is used. I'd say the diode approach is better than the relay approach since it is less complicated and it should last longer.