Hope you'll get something useful out of my little essay. ;)
I swapped a D16Z9 into my MA8 around two years ago, came out of a USDM EJ1 but was also used in the MB1. It even ran very well with the stock ECU, believe it or not...
Regularly checked the sparkplugs' color and it didn't run too lean or anything.
Used that setup for roughly 18 months, in combination with my own 'VTEC-Controller' that I built and programmed, using an Arduino. VTEC Wizardry galore! :P
Then I finally got my grubby hands on a p28 this summer and it was a 'straight' swap again. Threw that self-built thing out the window the same moment. xD
The only mods that needs is wire in VTEC (already done before) and remove a few little plastic keys/guides on the ECU plugs that otherwise prevented it from plugging into the ECU. Though, I checked every single wire with my trusty ol' multimeter beforehand and the pinout is 100% the same. Drop-in replacement, so to speak.
My pops helped me with everything (car mechanic for 35+ years and an absolute magician) and even he was surprised just how easy an old Civic is to work on, really.
The other big thing you'd have to look up is plugs, e.g. the distributor, and that's basically it. There are adaptors for everything.
D-Series engine parts are so interchangeable it's ridiculous.
Example: The coil on my D16 dizzy went *poof when I tried to crank it after an oil pump upgrade with all of the plugs not grounded (big dumb-dumb), but I actually got the D14 dizzy to work. Timing was a bit off above 4000 RPM and I had to mount it with a single screw and around five zipties, but it worked until I got a replacement coil... :D
The only other issues you could encounter that I didn't would be immobilizer-related, just like @dan1 said.
But that should solve itself by using an OBD1 ECU, like a p28 for example, because according to my research OBD1 ECUs don't really communicate with the immobilizer that much. It's more like a simple 'OK'-signal being sent, no real data transfers like with the OBD2 ECUs.
And you could of course use certain methonds that I won't get into for multiple reasons to just ... get rid of your immobilizer and remove that factor from the equation. Racecar and all that.
Long story short: Go for it, swapping D-Series egnines is about the easiest engine swap one can do. The swap itself is going to take 8-16 hours total, btw. d(^__^)