Floquet-Anderson localization in the Thouless pump and how to avoid it