It's worth noting that production of the M5 continued well into Calendar Year 1988, ending in November of 1988 which was well after production of the E28 chassis ended in Germany in December 1987.
The E34 M5 was produced from 1989 to 1995, although sales in North America started in 1991 and ended in 1993. It was produced at BMW M GmbH in Garching, Germany and like the previous M5, was entirely hand-built. It utilized the 535i chassis which was produced at BMW's Dingolfing plant. Assembly was done either by a single M employee or a team of M employees and generally took about two weeks. It is rumored that the test drivers of the E34 M5 could determine who or what team made each specific M5, due to characteristic quirks of the handbuilt nature of the E34 M5. The engines were also built by hand by BMW M technicians. All of the E34 M5 powerplants were built to a tolerance of within 5% of advertised output.Source: Wikipedia.