If the car was certified by the dealer an you get a good price, you should consider the purchase. Resale, would be lower, but given the reduced price already paid this might be OK.
Also consider the 2011 model is near the end of its warranty, so any problems from the accident regardless if repaired by a BMW dealer will be off their books.
I also question accidents as the damage breaks the rust proof seals. You normally have premature rust compared to other accident free cars.