Mine is 330d, so the ecu is not ms43 i believe. Can i read/write the diesel ecu with inpa ?https://www.youtube.com/watch?v=BFwdIiqxtbk
This is if you are broke and skilled, you can DIY this.
If you are lazy and rich you can buy one that's already blocked along with headers and increased rev limiter. I bought this one: https://www.seemslegitgarage.com/product-page/tuned-ms43-ecu with a discount at some point.
The M54 does not have an external EGR valve, it has internal EGR, and cannot be removed. What you removed was the secondary air valve used to heat up the cat quickly during cold start up. The secondary air does not effect the engine power at all, and turns off after the cat is warmed up.