Note in the eCrate link it's explicitly claimed to be legal when done correctly.
What I was recalling is the EPA's Engine Switching Fact Sheet from 1991.
https://www.epa.gov/sites/default/files/documents/engswitch_...
I learned today that it was replaced in 2020 by the EPA Tampering Policy. This one doesn't seem to focus so much on engine swaps but on the emissions devices themselves.
https://www.epa.gov/sites/default/files/2020-12/documents/ep...