Yeahhhhhhhh... no.
From History.com “Though the Great Wall never effectively prevented invaders from entering China, it came to function as a powerful symbol of Chinese civilization's enduring strength.”
Walls are mere symbols and as is often the case, especially with walls, symbols that simply quarantine the frightened as history rolls over them. The Ming dynasty was the most ardent at building the wall and yes, it did nothing to stop them getting steamrolled by the Qing. Perhaps if as much effort was put into building bridges....?