It's kind of interesting to read about contemporary reactions to
Night of the Living Dead, which included "it's obviously a commentary on the Vietnam War" and "a critique of American capitalism". The closest anyone got to racial issues was the observation that at the end, the (black) main character is killed by a (white) posse led by a sheriff -- which seemed to some people to be an obvious commentary on the Civil Rights Movement and the recent assassinations of Martin Luther King, Jr., and Malcom X.
The modern (21st C) vogue for zombie apocalypse movies pretty clearly stems from two sources: Japanese video games in the 1990s; and a pair of British films in the early 2000s: Resident Evil (based on one of the aforementioned Japanese video games) and 28 Days Later. (It's a bit hard to argue that both the Japanese and the British were acting out some deep-seated fear of a black slave uprising.)