I'm not sure about this. I would figure that slightly newer DMEs are compatible. The early E36 motor is identical to the E30 unit - except for mechanical parts like the oil pans and accessory drive. I'd assume that the DMEs are identical or nearly so. I'd assume that some early E36 DMEs will have EWS security.
I'd carefully study the pinouts first...BMW has a tendency to swap pins on various functions. It's not that easy as documentation tends to be pretty slim on DMEs.
Even extremely similar units from the same cars can have considerable differences. I've had quite a few Motronic 1.0 cars, and those DMEs do not swap unless you carry over many matching parts. For instance, particular AFMs are paired with specific DMEs. My '84 745i has an M1.0 that won't swap with anything else - it includes an auto tranny ECU and a knock sensor.