Intent and moral object are separate considerations in morality. Intention never determines moral object, and a change in intention cannot change a moral object from good to evil. An act is intrinsically evil if it has an evil moral object, regardless of intention.
A lie is the deliberate deprivation of truth from an assertion, regardless of intention or circumstances. The intent to deceive is separate from the moral object. A lie is still an intrinsically evil act, even if there is no bad intention, and no intention to deceive.
Choosing to engage in marital relations while taking a medication that deprives the marital act of the procreative meaning has the good intention of treating a medical disorder, but also has the evil moral object of sexual relations deprived of the procreative meaning.
A physician intends to relieve the suffering of his patient by witholding ordinary and necessary care, so that the patient dies as a result. This act of euthanasia by omission is intrinsically evil because the moral object is the deprivation of life from an innocent person. The intention to relieve suffering does not change the moral object.