Why not get an old cheap E39 and convert it to a 530i M-Sport. When it is converted, everything in the car is swapped and all mechanical and electrical units will be plug and play with no programming needed.
Registration can be done easily.
Btw I have a 1998 525i E39 for sale at the moment.
Ps I did my car and works perfectly
Sent from my GT-N7100 using Tapatalk