Endeavour Coal has been hit with a massive fine after a train almost hit three workers at its Appin mine.