Missing Encoder Steps

Anyone have any suggestions on how to implement the z index into my current code?

And yes the rotary encoder does read 0 at 0 and 4096 pulses at a full rotation.

The suggestion for the index code was to confirm that you are seeing 4096 pulse between index pulses.

If you have indeed confirmed that you get 4096 pulse with a complete rotation, than any errors you see must be due to either missing pulses because you go too fast, or mechanical issues of backlash, slippage, etc.

You can put an interrupt on the z pulse pin, and read the pulse count of the encoder when it is triggered. You might see a difference counts between fast and slow movement to the stop, it which case you are missing pulses.

Did you change your code to work solely with counts, and not the float math until you understand things? Did you change your code to use Serial instead of lcd until you understand things?