It all depends on what you mean by "safe". It is certainly possible to create input methods that behave as spyware, that's why Android puts a big fat warning telling you so whenever you switch to a third-party input method.
I think what is meant by safe in this context is that an that is not an input method cannot pretend to be one. Likewise, the interface between the input method and applications means that an application cannot normally wire itself into the input method and monitor everything the user types.