Steam engines were stationary at first. They were used to eg drive pumps.
> Weirdly though, electric generators in watermills would have been much more attainable - except nobody had any understanding of electricity.
Yes, and proper dynamos were invented only quite a long time after batteries. (So called self-excited generators.)
And you have to compare the early bad electric generators they could have come up with against the gears and shafts they knew to transmit the motive force of the water over short distance eg to the mill stone.