TERMINAL ISLAND, Calif.—Ten thousand railcars a month roll into this sprawling port complex in Los Angeles County. While here, most are inspected by a subsidiary of Caterpillar Inc.

When problems are found, the company repairs the railcars and charges the owner. Inspection workers, to hear some tell it, face pressure to produce billable repair work.

Some...