Screw threads and nuts have to be made with clearance between their sliding surfaces to allow them to rotate without getting jammed stuck. If you try to use the head end of a threaded rod as a piston, the liquid you are trying to pressurize will ooze back through the clearance space and leak away.
As pointed out by Solar Mike, there are types of threads which are instead sized for interference so they must be forced together to fit, including the nylock type. But the friction forces between them are quite high, and it would take a very strong motor drive to rotate the shaft and move it back and forth against that friction.
Also note that interference fit threads are not intended for use as moving parts. They are intended to lock together so they do not unscrew after being assembled. The nylon part (inside the nut) will rapidly wear out if it is screwed back and forth repetitively, and quickly wear out- and start to leak.