Dr. Walter Stein says that Aquinas represents the "true" Manicheism and criticizes the false which had become a "travesty".
"In response to the opposition of Manichaean dualism Aquinas emphasises that the union of body and soul is essential for humans, and that it is to the advantage of both body and soul. "To be united to body is not to the detriment of the soul but to its enrichment. There is the substantial benefit of completing human nature, and the accidental benefit of achieving knowledge that can only be acquired through the senses".
"He says that our body substance is not from an evil principle, as the Manichaeans imagine, but from God. "By the friendship of charity, by which we love God should we cherish the body." In his opinion the psycho-somatic interdependence goes so far that the quality of intellectual life depends on the quality of the body. When the body is a hindrance for the achievements of the higher aims of human life, it is not due to its being body, but to sin which corrupts the body and disturbs the harmony between body and soul."
As you can see, the doctrine he was opposing was one of the Lucifer-Gnosis.
"With regard to heretics there are two points to be observed, one on their side, the other on the side of the Church. As for heretics their sin deserves banishment, not only from the Church by excommunication, but also from this world by death. To corrupt the faith, whereby the soul lives, is much graver than to counterfeit money, which supports temporal life. Since forgers and other malefactors are summarily condemned to death by the civil authorities, with much more reason may heretics as soon as they are convicted of heresy be not only excommunicated, but also justly be put to death.
"But on the side of the Church is mercy which seeks the conversion of the wanderer, and She condemns him not at once, but after the first and second admonition, as the Apostle directs. Afterwards, however, if he is still stubborn, the Church takes care of the salvation of others by separating him from the Church through excommunication, and delivers him to the secular court to be removed from this world by death. The Decretum repeats Jerome's comment, "Cut off the decayed flesh, expel the mangy sheep from the fold, lest the whole house . . . the whole body, the whole flock burn, perish, rot, die. Arius was but a single spark in Alexandria, but as it was not at once put out, the whole world was laid waste by his flame." Thomas Aquinas