Overhead wires take quite a while to plan and build and for non-frequent service (1tph) and/or short trains installation costs and maintenance are quite high compared to buying e.g. BEMUs. Many of these services are shuttle runs with electrification at one or both ends and route lengths of less than 100km, so e.g. a Mireo Plus B with ~120 seats only a 580kWh battery (or less than 6 Tesla Model X batteries ) is used (https://www.vde.com/resource/blob/1979350/a41e9c3559af76fee9... page 24)
HEMUs for these types of services I don't understand. It's laudable that transit providers want to get away from fossil fuels (and putting up overhead wire is a long and arduous process, fraught with delays), but getting hydrogen today almost certainly isn't "green". Maybe "Technologieoffenheit" virtue signalling.
But looking at the plans of various german transit agencies for future service on non-electrified lines, it's pretty obvious that hydrogen has already lost for rail-based transit, with almost every tender that doesn't prescribe a technology going to BEMUs and studies showing that BEMUs and partial electrification or full electrification almost always makes more sense than HEMUs