https://www.insanelymac.com/forum/applications/core/interface/file/attachment.php?id=139590
Darwin Dumper:
https://bitbucket.org/blackosx/darwindumper/downloads/
Launch Darwin Dumper, and hit the button to uncheck all, and then check just the EDID option, and run it. It'll create a folder with an EDIDfile for each connected display.
Then, launch FixEDID, and you'll see a dropdown list near the top with all connected displays. Use that to find the Vendor ID for the good monitor you want to clone, so you know which EDID file you need to import. It'll say something like "Display 0x58e1:0x0", that first byte (58e1 in this example) is the Vendor ID, the second is the Device ID, which in this example is borked and so showing a 0.
Once you know that, select the display you want to override in that dropdown. Then, click the "Open an EDID file" button, and open the .bin EDID file for the display you want to clone from Darwin Dumper's exports.
Once you've done that, the path to the file will show up in the text field below that button. Below that, there's a dropdown that currently probably says "Apple iMac Display (8:5)". Click on that, and choose the option "Only Inject EDID Unpatched/Edited".
Check the "Ignore IODisplayPrefs check in this display" and "Add/Fix Monitor Ranges" buttons, and then click the "Make" button. This will save a DisplayMergeNub.kext and a folder starting with "DisplayVendorID-" and then your display's ID. You can get rid of the kext, you'll just need the folder.
Reboot the computer into Recovery mode by holding down Command-R when booting, and then, after choosing a language, go to the Utilities menu and run Terminal. Type "csrutil disable" and press enter, to disable SIP, and reboot.
Once booted, navigate to /System/Library/Displays/Contents/Resources/Overrides/ and move that "DisplayVendorID" folder into it. Reboot back into Recovery Mode, launch Terminal, run "csrutil enable" to re-enable SIP, and then reboot. Et voila, your display will now use the cloned EDID instead of what it reads from the display.
(You could, of course, also just use Terminal in Recovery Mode to move that folder right there, without ever having to disable SIP, which should be
sudo mv /Volumes/Macintosh HD/Users/<username>/Desktop/<Display Override Folder> /System/Library/Displays/Contents/Resources/Overrides/ && sudo reboot
You actually probably don't need the sudos there, since Recovery Mode runs as root already, but I haven't verified. I did it with SIP off and rebooting, so I could just do it with the GUI)
In theory, there's a way to do a script that just does all of this if SIP is disabled, including generating the override files without using these apps, but I'll leave that as an exercise for the reader for now, LOL.