Are you sure they are brushless?, It is always a problem when you have a motor that has a sealed rear endbell, if you take one apart, you may be able to open the rear end and attach an extension shaft, but if they are brushless, make sure you do not harm the commutation electronics.
The other way is if you tightly couple the outgoing motor shaft to a ball screw etc, you can place the encoder on the remote end of the driven shaft.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.