You only need to do an encoder alignment if it’s a permanent magnet motor, you can also just put a balanced load in it.
Noise is a major cause if encoder faults too. Make sure the shield is only landed on 1 end and cable isn’t running with high voltage. Motor cable and brake coil wiring should both have the shield landed on both ends to keep the noise in. Check all your motor connections too.