If you're just skipping the NEMA wall outlet and going to 40v DC that's different. You might want too go with a non-isolated switched mode there for efficiency. Still, an inverter above 20kHz and transformer at high frequency in an RCC or resonant forward configuration shouldn't have terrible losses and the transformers at high frequencies can be small and multiple for different output voltages if necessary.
I think the design goals regarding space, weight, cost, flexibility, and reliability really come into play here.
About that buck convertor... I'm just a hobbyist when it comes to power supplies but since a buck convertor tends to use semiconductors I'm thinking a 400v input might be an unusual design. The highest input voltage rating I find for a "high voltage" DC buck convertor is around 140 volts. If you tap the battery a quarter of the way through you could do that, but then you're loading that portion of the cells more than the rest. I can find 700 volt "AC bucks", but there again you're talking AC power. Everything I can find that bills itself as a 400v capable down-stepping DC to DC buck convertor has an isolated portion labelled, which means it in fact has at least a 1:1 transformer somewhere connected to the buck. If you're talking about flipping mechanical relays quickly instead of transistors and diodes, you're going to have a lot of noise, slop, and reliability issues aren't you?
If you have something to run that needs constant motion besides the current, a motor-generator might be useful. That can convert pretty directly. I'm thinking like the outboard drive shaft on older midsize tractors.
And a motor-generator is far lossier than a flyback converter, they're mostly good for high-power applications where you need to convert from single phase to 3-phase and need isolation at low cost. Even then a VFD (variable frequency flyback converter or inverter) will be more efficient, just more expensive. Though days VFDs are getting quite cheap for their power.
Basically not all transformers are equal. You need to get the properties right to match the application. In the case of their use as a component in an isolating DC-DC converter (or inverter, or other similar system) they're typically not mentioned separately, since the converter is usually a module.