The dry run caught this because someone read the output for COPY lines. I'd make missing lines fail the script on their own, so the next empty import can't get past a tired reviewer.
Two cheap assertions would have done it. Before running, count the commands in the generated file: grep -c '^\\copy' import.sql should equal the number of CSV files the export wrote, and the script stops if it doesn't. Inside the transaction, before the ROLLBACK, a DO block can compare each table's row count with a manifest from the export step and RAISE EXCEPTION on any mismatch. With \set ON_ERROR_STOP on, psql then exits 3 instead of 0.
That turns "nothing ran" into a red exit code. It's the same move you made later with checksums over counts: the check has to prove the work happened, not just that nothing failed.