I found a good method in the more Open Area Gang Wars today. I was up in Las Colinas on the very North East. There is an elevated road that arches up, and then back down, and next to it is the Main Road. I would grab a bike, start the war down there, stay down there on the Bike, then as soon as they spawned, I would ride on top of the Arched road, and shoot from there.
But the key isn't the M4. I've used the MP5 and AK47 the whole time, for every single one, and I've owned alot. The AK is very useful, as is the M4. But I tend to swap around. I use the AK for long distance shooting, and the MP5 for close range stuff. Works very well. AK or M4, it's all the same.