Getting good data would be very hard, a dial indicator probably won't work very well with 0.2mm layer height and smaller. Maybe a laser would work better, but the amount of noise would be pretty high since 3D prints usually aren't as consistent to begin with.
A much better way this is done these days is an accelerometer on the print head. Then you can put the printer through a test program which wiggles the thing in different directions at different frequencies. The accelerometer can compare the expected result with the actual result and can pick out any weird oscillations or ringing of the machine. The data from this can then be applied when slicing, to compensate for the machine properties.
This is a pretty standard function on most high-end printers these days. And is even in reach for cheap machines, since you can buy USB accelerometers for this purpose. The downside of those is the USB cable skews the result a little bit, but if mounted permanently and the cable routing is done well it can work great.