Wal-Mart Stores Inc. agreed to upgrade post-Thanksgiving Day crowd-control measures in its 92 New York stores to avoid prosecution by the Nassau County District Attorney in the November trampling death of a temporary worker.

The retailer also agreed to have its plan approved by independent safety consultants and provide $400,000 in expedited restitution to victims of the melee. In addition, Wal-Mart is donating $1.5 million to Nassau County social-service programs and has agreed to hire 50 local high school students annually...