Well, a number of things to consider. You say you need to work a height of about 40 feet. If you need to work at 40 ft, I would suggest a 60 footer at least as a 40 footer would have to be straight up and fully extended to achieve that, and you won't be able to boom around much to reach other close by spots as you're maxed out already.
And if you're working on rough terrain, you would not want a 2wd, you need a 4wd with articulating axle. If you don't get that, you're wasting your money. Most machines that I have worked on only have brakes on the wheels that have drive motors, so if it's 2wd you only have 2 brakes. Brakes on most machines are spring applied and hydraulic pressure release. Once you let go of the drive lever the brakes are applied and locked. There are some odd machines out there that use driveline brake or old fashioned brake drums at wheels, but JLG and Genie use spring applied multi disk brake packs on the drive motors.
Going up and down grades is always tricky with these machines. 2wd rigid frame machines being most problematic, 4wd with articulating steer axle performing the best. But changes in terrain, potholes, gravel, slippery traction conditions, many things can affect gradeablility of machines. Grass? Even worse, a grass slope? Probably the worst terrain to travel on a manlift, up or down. If that grass is just the least bit damp it's Katy bar the door get the kids and the dog out of the way I'm coming through. If you are on solid terrain going uphill, and it's too steep, always a chance it will stall drive motors via relief valves, or tires spin. Then you would have to go back down. Going down a too steep grade could pop open counterbalance valves on motor and cause it to move too fast, to which operator would release drive and engage brakes, sudden lock of brakes could cause it to skid to a stop.
Probably the biggest danger in a manlift out of control and moving at speed on a slope, or flat ground for that matter, is a pothole or bump. This can cause the boom to react with violent force that will seriously hurt or even kill the operator. Which is why under no circumstances should one operate a manlift without wearing full body harness.
As for what percent grade one could/should be able to climb, don't really know, I only know when it looks steep, I get nervous about it. One radical way of looking at it, say it's a grass slope. Well, imagine driving a 2wd pickup truck with a load up that hill. If it won't make it, don't even think about it with a manlift.
The tow behind machines that heavylift linked to may be an option. They are relatively light weight, and hooked to the back of a 4wd truck, might be able to safely maneuver it to a work position. I do know those type machines have to be level to operate. They have sensors that won't let them operate unless the outriggers are able to get the machine level.