Can ferrite beads be used on digital PWM output?
Big picture: good signal integrity equals less EMI, even at ‘only’ 4MHz. Those harmonics can haunt if you don’t deal with them.
So look at several things in the SI area first.

Signal rise time. The ferrites could actually help here. You could also accomplish the same thing with an RC network.
Impedance matching. Reduce signal reflections by using controlled impedance an appropriate termination strategy.
Loop area. Make sure your signals and returns are as close to each other as they can be. The smaller the loop area, the less antenna effect.

If that isn’t enough, there’s a couple more tricks in the bag to further suppress EMI.

Common-mode filtering. If your signals and returns can be routed together in the same harness, put a ferrite around all of  them to suppress common-mode noise.
Shielding. Have an overall shield that does not serve as a ground return. Look at a USB or HDMI cable for example.
Lossy materials (ferrite). Convert the EMI to heat.