Large stretches of the M4 are set to be hit by road closures that will impact drivers.