This is a much more complicated question than can be answered in few paragraphs. After reading dozens of books, I can tell you that some of history is incorrect, but going after the career of one of the leading Generals, well that is tougher.
It will be easier to consider the issue of the defense of Europe. First, you have to realize that the German plans all called for the invasion to happen at Calais. The Germans believed a Harbor would be vital. So they put a majority of their defenses into the Harbors and strung defenses along the rest of the coast.
It showed a fundamental misunderstanding of how Seaborne Invasions happen. Rommel was just as guilty as any other German General. But you learn by doing, and they haven’t done any. Minor invasions of places like Norway, against an unprepared enemy, and their seizing the harbors worked, so that was how you did it.
The Germans also discounted the use of Airborne troops. After their disaster in Crete they never again conducted any major airborne actions. Crete was a vital defeat. The Germans had enough troops to do a major operation against either Malta or Crete. They would have been well served to attack Malta. Because later in the war, Malta became vital in interdicting supplies destined to the North African Front. Reducing the vital supplies that Rommel needed to conduct operations.
Back to D-Day. As I said, Rommel and the Germans had a fundamental misunderstanding of Seaborne Operations. Their planning for Sea Lion, the invasion of England, is a prime example. They treated the invasion as a large scale River Crossing. They didn’t understand the difficulties, difficulties the Allies were learning about with every operation, North Africa, Sicily, Italy, and all the invasions of the Pacific as test beds for tactics and strategy.
This led Rommel to install massive defenses assuming that the Invasion, if it came, would come at High Tide. It seemed to make sense. A shorter distance to cover from the water to the shore where cover and defenses would be. A shorter distance for troops to cross to get to the enemy.
But Rommel was wrong. The Allies would come ashore at low tide, leaving all the defenses high and dry out of the water.
Rommel was an aggressive Commander accustomed to the attack, not defense. So he tried to design the defense on what he would do on the attack. Instead of learning about what the Allies were doing on the various attacks, with plenty of examples from the Pacific if the Japanese would share the information, and in Europe, there was ample evidence that they would come at Dawn, and at low tide.
There was also plenty of evidence that the Allies would not come ashore at a port or harbor.
They would come ashore on a beach and move inland to seize the port from the rear.
Partly this is Hitler, who was in his mind a Military Genius, and partly it was as I have said, a fundamental misunderstanding of seaborne operations.
Rommel wanted the troops held back, able to act as a reserve force and move to wherever the invasion would come. This was madness. The Allies had air superiority and gathering the troops at concentration points for the march to the site of the invasion would subject them to constant attack from the air.
Rundstedt wanted all the troops down on the beach with no reserve. This was also madness. They would be subjected to unstoppable bombardment from the sea with artillery so large it defied the imagination.
In reality both were wrong, and both were right. Hitler showed his political brilliance by trying to do both. That doomed the German Effort. There were not enough troops on the beaches to hold. And the reserve was too spread out and subject to too many superiors to be usefully employed in a timely fashion.
Finally Hitler required his personal order to release the best units, the ones who could theoretically throw the Allies back in the sea. On the night of June 5th, Hitler took a sleeping pill with orders not to be awaken. For the vital time, he slept. And when he woke, he was furious that the Generals were denuding the defense of Calais. That was where the real invasion would come from.
So was Rommel a good General? Yes. His design of the defenses was brilliant. He multiplied the effectiveness of each German Soldier, costing tens of lives for each German killed. A good attack against prepared defenses take a three to one advantage. At least. If the Allies had come ashore with that, they would have lost. They came ashore with much much more.
But the war was essentially won before that. Remember the argument between Rundstedt and Rommel. Each were right, putting the troops where the other general wanted was madness because they would be subjected to overwhelming attack from the Allies. Rommel was correct. Troops on the beaches would be subjected to massive preparatory artillery bombardment from the overwhelming number of Allied Ships including Battleships with 14 inch and 16 inch guns. Rundstedt was also correct. Troops gathered in the rear in sufficient numbers to be effective would be easy targets because the Allies had Air Superiority.
What do both points admit? Massive Allied Superiority. Control of the Sea, and the Air.
At this point the Germans couldn’t contest the air even over Europe. The Allies had too many planes. Too many pilots. For every plane the Nazi’s could put up in the sky, the Allies had five or six. It is why they were working on Superweapons. The Germans no longer thought of numerical superiority, they now needed weapons which were the technological marvel and would allow them to cleave a path through hundreds or even thousands of enemies.
Each day hundreds of planes made their way to Europe. Bombers were flying directly from the United States and landing in England. Fighters were flying long paths that ended in Europe too.
Planes in crates were brought over by ships with the U-Boats were unable to make a dent in with Hunter Killer teams searching for them day and night.
Imagine forming your plans for the defense of Europe making these two concessions. 1) The Allied Fleet could sit offshore. Literally dropping anchor and pound the shore for days uncontested. 2) Allied planes could and would fly overhead during all daylight hours. From dawn to dusk there would be an umbrella of enemy planes controlling the sky and you would be unable to contest it.
Rommel was realistic enough to know if the Allies got ashore, and got a foot hold to go inland, the war was over. Germany could never win. He was smart enough to realize that if it lasted more than a single day, there would be no way to throw the Allies back into the sea. From then on, just as they were doing on the Eastern Front, it would be a delaying action.
The only hope Germany had at that point was if they could prevent the invasion, they could transfer hundreds of thousands of troops to the Eastern Front to give a check to the Russians and give themselves time to consolidate and perhaps negotiate a cease fire and end to the war.
So to answer your question. Was Rommel a good general? Yes. Was he brilliant? Yes. Was he doomed by circumstances? Yes. Was he the best general in the War? No. That honor would have to go to Georgy Zhukov.
Yes the Soviet Commander was better IMO than Patton or any other General. Why? He turned the tide at Moscow, at Stalingrad, and again at Kursk. At Kursk, Zhukov destroyed more Germans than even Stalingrad had. And from that moment on, the Germans were never again on the Offensive on the Eastern Front.