Three fireworks companies have agreed to pay more than $4 million to settle a federal lawsuit tied to a 2020 California wildfire.