Comment by atoav
Probably not the most elegant solution, but there are many HDMI switchers out there that can be talked to using gpio and/or RS-232. You could use one of those and a Raspi, feed the image in from the Raspi, detect the power of your embedded device via GPIO and then switch over to the other HDMI input. Whether that is a feasible solution mostly depends on other requirements, e.g. regarding power consumption or space.
I used a similar solution once in an AV context and it has been running reliably for years now.
If you want something less hacky Blackmagic has the Atem Mini, a good HDMI switcher that can also store multiple stills and can be switched via ethernet (among other things)