If the location is "safe"- no explosive gasses or dusts, the electric motor is normally a better choice.
If you have varying speed issues and a large, constant torque load, the hydraulic (as a hydrostatic drive) is the better choice.
If you have high electric costs and relatively inexpensive fossil fuel (natural gas, diesel, gasoline, etc.) then an engine-driven hydraulic might have value- especially if you can recover the waste heat from the engine to heat process water or whatever. It becomes a small "CoGen"- combined heat and power- unit.
Select each drive based on calculated HP load.
__________________
NO MATTER HOW WELL YOU HAVE DONE SO FAR, ALWAYS TRY TO BE BETTER TOMORROW.