I tend to be a bit 'old school' when faced with problems like this. Logging the step and direction inputs to the stepper motor driver(s) with a logic analyzer will get pretty close to giving you a true picture of the position. I have used a 'Saleae' logic analyzer for this purpose on X, Y, and Z motors simultaneously. Genuine Saleae analyzers are about £400 although clones are available at about £40 - I don't know how good they are.
It sounds like you are looking at the extruder alone - in which case the above approach should be good enough. For X, Y, and Z position there are a lot of dynamic effects which mean that the commanded position, i.e., that calculated form step and direction signals, can be quite far from the real position. In this case, an approach based on encoders independent of the stepper motors would work well.
Mike