Faults in the system outside of the key can cause the remote entry to not work. So it would be an expensive test to buy a new dealer diamond key and have that not work.
Here are a couple of threads, with relevant info on keyless entry problems and solutions I've used on my 2001.
First one is how I got used diamond keys off eBay for $15 each and use them as key fobs, paired with genuine valet keys bought from thebmwminipartstore.com
https://xoutpost.com/bmw-sav-forums/...ml#post1079644
This one is how I replaced the rechargeable batteries in two of my fobs once they became weak. Extensive testing on charging solutions.
https://xoutpost.com/bmw-sav-forums/...r-options.html
@Qsilver7 has great posts on here somewhere with exact instructions on the programming of the fobs. Unfortunately, the entire system can be perfect and a simple mistake in the programming procedure will simply fail without letting you know why.