I've seen improvement in my lateral deltoids from military pressing, but not the "standing incline press" version many people use.
If the barbell stays somewhere between the center of the head and the the back of the head when it's overhead, the lateral delts will be hit fairly well. The head must be in line with the spine though, not pushed forward.
I've seen results with both seated Z Presses, and standing behind-the-neck presses with limited ROM. With the second, I'd bring the bar down no further than the top of the ears. In both of those, the bar is pushed overhead and back. This shifts the load from the front delts to the lateral delts.
It takes a lot of shoulder mobility, thoracic spine mobility, and body awareness to do that, and still can risk impingement if you're not careful with the ROM.
As a shoulder builder, lateral raises are probably better.
Partial wide-grip upright rows also work decently well. Just bring the bar up until your elbows are in line with your shoulders, hold it for a few seconds, then lower. You want your hands to be directly under your elbows at the top.