Measuring Z positioning accuracy
In the world of hobbyist milling machines, a DRO accessory is extremely valuable for improving work flow and accuracy of project builds. The Digital Read Out devices run the gamut from affordable to astonishingly expensive and cover one, two and three axis readouts.
For single axis purposes, some hobbyists will simply find a means to attach a digital caliper, as you've suggested, to the machine with appropriately fabricated brackets. That's one option. For a few dollars more, there are off-the-shelf digital read-outs, such as this one from Amazon:

Six, twelve and twenty-four inch travel options are available with the pictured six inch unit priced at US$39.95, a reasonable figure for 0.01 mm accuracy.
One can purchase pricier models with higher resolution if required.
Brackets included with the device may not fit well to your application and may require modification.
Some DRO devices, such as the one installed on my mini-mill, use physical contact (gears) to read the position information, which means friction and loading of your printer. Other models use micro-engraved glass scales and have minimal friction, but will likely be a bit more expensive.