I have assembled electronics for military equipment, and whilst it’s true many of the wires were pink they were usually identified on their ends by number sleeves, both in the standard 0-9 colours and printed with the digit.
So it was not totally anonymous.
Board-level wiring may be far less common, but it’s probably still normal inside equipment-racks to connect all the board sockets and the outside world.
.
Red regulator handles seem quite common, but I suppose there was never much point painting things like injectors which would probably slough the paint off anyway.
I very much doubt anything on a steam locomotive was ever painted to warn anyone it might be hot. All those who had any business being that up close and personal with a locomotive in steam, would know most things with pipes on are likely to be hot; but that was probably one of the least hazards in a busy steam shed.
I recall a friend who’d had some experience on one of the Welsh narrow-gauge railways recounting how he’d been invited to fire on one service. He said the regular crew were impressed that without having been reminded, although he’d turned the injector water on as the locomotive came alongside the platform, he’d not turned the steam on until the footplate was safely by the end ramp. (Not just so he could see the injector overflow easily. It avoided the hazard of splashing people on the platform, with hot water.)
.
The transport museum in Glasgow has settled arguments about regulator handle colours simply by removing the levers completely from the three or four locomotives on display! Goodness knows why. I suppose most visitors would not realise there is anything missing, but you and I would spot it immediately. As I did.