Yes, this is basically the correct approach. Strictly speaking, some of the energy you put in will go into heating the water -, i.e., the water will get hotter as you agitate it. So theThe energy balance would be something like:
$$ \Delta E = W + C\Delta T $$
where $C$ is the specific heat and $\Delta T$ the temperature rise. However, under most conditions, the temperature rise will be small enough that it can be ignored.