Does nerve entrapment cause e.D? If so is the damage to nerve permanent?

Possible. If nerves are entrapped due to caudal equina syndrome in your lower back, you could have ed, but also, would have leg weakness and numbness, and urinary and bowel problems. Peripheral nerve issues can cause the problem, like diabetes, but this is not a nerve compression. Suggest you visit a good urologist and get evaluation.