The silent corruption problem
When a Google Form gets two submissions within the same second, Apps Script can fire two separate trigger executions in parallel. Each one calls getLastRow() before the other has written its new row. Both read the same row number, both compute the same next ID, and you end up with two rows sharing one invoice number — with no error, no log entry, nothing. The first time I hit this, the sheet looked fine until accounting noticed duplicate invoice 1047.
Sequential IDs, running totals, and 'get the current max then write max+1' patterns are all vulnerable to this. Any read-modify-write sequence across two executions is a race condition waiting to happen.