A warning has been issued to avoid the M4 during a major closure that could cause significant traffic.