Piezo is good for short stroke, high cyclic pressure.
Linear magnet / coil is good for high speed cyclic.
However harvesting power in these ways from a prime
mover seems silly. The example of a front end loader
is particularly bad because you only harvest power
on the changes in force or position, which are slow
and infrequent on such a machine (while you have
a fat motor spinning an alternator, not 2 meters away).
Not everything that could be done, should be done.