It's a strange one!
The amount of yellow applied varies, but is subject to a minimum coverage (x%) of the end of the loco/DVT. Back in the 80s when the class 59s were delivered, they had (IIRC) no yellow warning panel for a while, then later a very small one - but either way, compared with other rolling stock, the yellow area was minimal. Why were these locos treated differently to anything else?
On today's railway, taking TPE's fleet as an example, the yellow panel is on the small side on the 170s/185s, yet the unit numbers and fleet name / logo are on the yellow, which will affect the % figure of yellow area.
In the modern era where just about everything, if not actually everything, has high-intensity LED headlights, do we really need yellow panels any more? Even the BR era headlights (those retro-fitted to main line locos in the 80s, in addition to their headcode lights) were visible when a train came into view long before the yellow panel was. Yes, lights can fail, but even so.
We are one of very few countries to still insist on having yellow panels, so does that mean more people are mown down by trains in the likes of Germany because they do not have yellow panels (but do have the same powerful LED lights)?
And as someone said above, steam engines are exempt. Why? Negligible risk I assume, as they are very few and far between.