Seemingly, no it wasn't
On the DVD commentary for The Empire Strikes Back, George Lucas denied that the Wampa scene was created to address Hamill’s injuries, noting that the scene had been written some time earlier.
From IMDB
However, George Lucas explains in the DVD commentary that this attack was merely to keep the audience interested while the Empire searched for the Rebels and to introduce Obi-Wan Kenobi's Force ghost and, by extension, Yoda.
From a different section of IMDB
An oft-quoted myth is that the Wampa attack on Luke was devised to explain the actual scars on Mark Hamill's face because he had been involved in a car crash and had to have reconstructive surgery. Hamill did indeed survive a serious car crash in January 1977 but did not have any visible scars by the time Empire began filming over two years later
From BusinessInsider quoting George from the Bluray Commentary
“At the end of ‘A New Hope’ he had been in a car accident and I knew Mark was going to look a little different than he was in the first film,” said George Lucas in the Blu-ray commentary of “The Empire Strikes Back.”
“But my feeling was some time had past, they have been in the Rebellion fighting, that kind of thing, so the change was justifiable. There’s a scene in the film where Mark gets beat up by the monster [Wampa], which helps even more, but that wasn’t really the meaning of why we wrote the monster in the beginning. We needed something to keep the film suspenseful at the beginning while the Empire is looking for them.”
(Above) Left is A New Hope and Right is Empire Strikes Back
(Below) His scars are however a lot more prevalent in this scene of Empire Strikes Back.
Hamil addressed this in a recent youtube interview he did.
they used a lot of the real scars to build upon
So there you have it, if the scars looked real it's because the make-up department used his existing scars to create a more realistic aesthetic for the fake scars.