Get a repair manual, invest in the 'cam tools' to hold the cams in place. Doing the job with engine in or out is dependent on accessibility. If it were myself doing it, I probably would do it with engine in being as I was a mechanic or...automotive technician, if you like. There are always ways to get around some of the procedures but, that comes from the experience of having generally done this type of thing many times on different vehicles over the years. For this particular engine in an Ex, I have studied the procedure they use and the first thing I would not do is pull the engine. The idea is to get things out of the way to get to the pump. If it's required to pull a motor mount or other for access, then I would do that. But, the biggest job I see with this is getting that front cover off which appears to include removing the valve covers which, in turn, means removing at least, the upper intake manifold. You would need to do this with the engine out as well. If it is possible to remove the front cover, the rest of the job getting to the pump should be a bit easier.
Once the cover is off, you can see the pump. It has the timing chains in the way to some extent and they want you to remove the chains for access. I think that if you remove the chain guides and the tensioners, you could move the chains away from the pump far enough to gain access without removing the chains but, you need to be careful not to get the timing out of kilter so you want to make sure the timing marks on everything concerned is lined up and the chains haven't slipped. If you are not careful about the timing going back together, you will have problems. If you can do this, it's a matter of removing all the bolts on the pump, pull and replace it. The one problem I see in putting things back together is reinstalling the front cover and making sure the timing gears and chains are properly aligned. They will have to be carefully reinstalled like threading a needle. The cover may have only one way to go back in so pay attention to how it came out!
That said, that is my thinking and is just theory. I haven't done this job. Just my thinking on how it may be possible to do the job, engine in. You also have to be careful about the access hole to the crankcase created when pulling the front cover among other unforeseen obstacles. Many other items will need to be removed around the front of the engine. Space to work may be a game changer and the biggest reason they may be recommending pulling the engine so you do want access to a lift if things go wrong because you can always stop where you're at and pull the engine.
For my last thought, I do not recommend doing this job the way I describe it may be possible if you are not a professional. As a matter of fact, I don't recommend tackling this job if you are a 'weekend warrior' unless you are very confident in a successful outcome.