Unknown component on encoder board
This does look like a IR led. I'm guessing the optical encoder is inside the black housing. Also this clearly has 2 pins meaning it can't be an encoder.

https://www.hamamatsu.com/jp/en/product/type/L6895-10/index.html