One of the jobs I had before I went into the Navy was cleaning machinery in a factory. Each one of us on the cleaning crew was issued a padlock and a lockout hasp.
The first person on the job turned off the power to the machine, inserted the lockout hasp on the power switch and then locked the hasp with a padlock. Every additional person on that job added their lock to the hasp. Only the individual worker had the key to his or her own lock. The machine could not be cleared to run without everyone removing their locks. It was a suspendable offense to leave the site without clearing one's lock. Working on a machine without locking it out was a termination offense.
That didn't work that way in the Navy. There were redundant sources of power to a lot of machinery. There could be several inputs of things that might hurt someone working on a piece of equipment.
What there was, instead, was a tagout system. Yellow was used for caution, red for danger. Most of the tags that one would see were red tags. Sometimes there were a shitload of red tags. Tagging out a boiler required tagging out everything that fed into the boiler, was operated to service the boiler or fed from that boiler. Tagging out a boiler required over sixty red tags.
To do a tagout right, a sailor had to bring all of the proposed tags and the piping/wiring diagrams to the EOOW or the Duty Engineer, as well as a tagout sheet, which listed each tag (now they are serialized) and its location. The Duty Engineer (since most tagouts were done in port) was supposed to go over the tagout sheet and the diagrams with the worker, then they would sign all of the tags and the tagout sheet. After the equipment (valves, switches) were all tagged, the tagout sheet was logged into the Tagout Log in DC Central.
Tags were supposed to be inspected daily by the workcenter supervisor, the LPO in charge of the relevant work center. A missing tag meant that the work had to stop until both the thing tagged out was checked and a new tag procured and hung.
To remove the tags, the worker brought the tagout sheet to the Duty Engineer, who signed to authorize removal. The worker then removed all of the tags and brought the tags and the sheet back to the Duty Engineer, who would inventory the tags. Both the worker and the Duty Engineer signed each tag for removal and signed the tagout sheet. Once that was done, the sheet and the removed tags were entered into the tagout log. Then, and only then, was whatever was tagged out cleared for operation.
Violating tagout was a big Bozo No-No. It was a damn near certain guarantee of getting maxed out at Captain's Mast (demotion, restriction to the ship and extra duty for 45 days and loss of half-pay for two months). The tagout system was at the heart of plant safety; I know of no Chief Engineer or Captain who had any sense of humor about tagout violations.