A Lancashire building company has been fined £36,000 for allowing sub-contractors to work unsafely on a gable end.