Update - the 1st remote was "bad" and was replaced by the dealer under warranty.
As for the 2nd remote, to my shock and amazement, the technician walked up to the car and remote worked without him doing anything!
All this time I was following the instructions in the book over and over. It said the doors would automatically lock and unlock when you successfully programmed it. The doors never did that and so I though it didn't work. Therefore I never actually tried the remote!