Ive had more than a few exploded quarry systems. I have, however, finally found a formula that works. To safely run 1 quarry, I use 3 water pumps, 1 refinery, 2 oil pumps, 9 combustion engines and one redstone engine (for getting fuel out of the refinery), and several different types of piping. Basically what you will be doing is piping water and fuel to your combustion engines, piping oil into the refinery, and piping fuel out of the refinery.
-Use one engine per pump, 2 on the quarry, and 2 on the refinery.
-I stagger the oil pumps (let one run for a bit then start the other) so it is unlikely I will run out of oil while the quarry is running.
-Always use gold waterproofed pipe for transporting water to cool engines (this is very very important as gold pipes can carry the largest amount of liquid per pipe section). You can use cobblestone waterproofed piping for fuel and oil. Use teleport pipes to get your different liquids around.
-Sometimes the pumps will bug and stop sucking up water. To solve this, use a 1 deep pool of water (this works unless your server starts lagging bad).
-Make sure to force load the chunks where your machinery is.
-Don't be shy with the teleport piping on your water system. I had all of my water pumps in one location using 1 output teleport pipe to feed the rest of the system. It blew up on me because only so much water can get through a single teleport pipe at a time.
It is possible 3 water pumps is overkill, but I have found the cost of running one more pump is well worth it. You can add to this system to power more quarries. Just be sure to keep the water flowing . Note that the engines on the oil pumps will use the oil as fuel if you do not put actual fuel into them (i usually start the system with lava and then run into this problem). You will use up your oil much slower if you get fuel into the engines instead of oil. To fix this problem, I usually wait until I have some fuel flowing and then pick up the pump and engine, then put both back down and wait for a little bit of fuel to flow into the engine before starting it again.