I had issues getting a 100ppr encoder to work reliable at 600 rpm. The cheap BOB seemed the issue, the system was loosing signals.
You are right, this is PC817 optocoupler bandwith issue.
I did some test, and PC817 response time depends on input current, if current increases, the bandwitch decreases (is this saturation?).
However 1 kHz is very low and PC817 sure can more.
If you use 5V encoder, you can safely connect it directly to LPT or MESA pins.
Most of 24V encoders with NPN outputs can be connected directly too, but you must check outputs voltage before (some has builtin pullup resistor an thats can burn low voltage inputs.)
MESA can more than encoder. Low cost optical encoders have bandwith 100 kHz, this mean max 2000 p/r at 3000 RPM.
LPT depends on jitter, but in practice 100 p/r is max at 3000 RPM