Your engine is overheating because you have it directly attached to the pump. Never directly attach Buildcraft compatible engines to any device if you cannot avoid it. The only exception here are redstone engines, which cannot overheat.
Why shouldn't you attach engines directly? Because Buildcraft compatible engines output power in bursts, whenever their piston stroke is at its highest point. A stirling engine strokes once per 52 ticks and generates 1 MJ/t; therefore, every stroke, it will attempt to output one single burst of 52 MJ. However, Buildcraft machines generally have limits on how much power they can accept per tick (burst input limit), and how much power they can use per tick. A Buildcraft pump has a burst input limit of 10 MJ. That's the amount the engine is able to squeze into it on its stroke. The remaining 42 out of 52 MJ cannot be transferred and thus remain in the engine, causing it to heat up.
The entire point of the heatup behavior is to make the engine stroke faster. If it strokes faster, the time between energy bursts is smaller, and thus the energy bursts themselves are smaller as well. A stirling engine heated up all the way to red will stroke once per 8 ticks, and therefore transfer 8 MJ per stroke. This is below the burst input limit of the pump, and thus the engine can finally transfer all of its power once it hits red.
...Except for the fact that a Buildcraft pump will pump no more than 1 bucket per second, using 10 MJ to do so. That means it has a maximum power usage of 0.5 MJ/t. The stirling engine is generating 1 MJ/t. So regardless of how fast the stirling engine strokes, it will never be able to transfer all of its energy to the pump because the internal buffer of the pump simply drains only half as fast as the engine is trying to fill it. Again, the engine can't transfer its energy, and eventually overheats and explodes.
If you connected the pump via kinesis pipes, the stirling engine would be able to output all its power into the pipes (which have a burst input limit of something like 1500 MJ), and don't worry about how much the pump is actually consuming. Since the pipe will also feed a constant stream to the pump this will actually make the pump go faster than with the directly attached stirling engine, because the initially slow stroke speed of the engine would mean that the pump only pumps something once per 2.5 seconds instead of once per second.