quoad is only an adverb when it means 'as long as'. When, like ergā, it governs a noun in the accusative, both are prepositions, but they have different meanings.
quoad limits the application of some assertion or introduces the topic for a following assertion. It's composed of the directional quō 'where to' and ad, which designates a limit.
- It's only an adverb when it designates a limit in time and translates to 'as long as (not), until', as in your last example (quoad eijus vīta terminētur); or, with licēre and posse, a limit of ability, 'as far as, as much as'. These are its most common uses.
- In your Aquinas excerpt it's a preposition whose function is likewise limiting or specifying: there are three elements of Sin, and Extreme Unction is said not to remit any of them: 'Sin limited to Stain without Contrition, Sin limited to Punishment, or Sin limited to its Remnants.' It can be understood as a reverse genitive: 'sin as far as its stain => sin its stain => the stain of sin'. This construction is actually grammatical in some varieties of English.
- Its other major use as a preposition is disjunctive: quoad hoc quod compertum est, dīcit... 'as regards what has been uncovered, he says that...'. Here it establishes (when preceding) or circumscribes (when following) the topic of discourse.
- These latter two uses don't depend on any verb and are characteristic of late and especially medieval Latin. Classical Latin uses quod ad X (attinet), quantum ad X (pertinet) and especially dē for the topic-limiting disjunct, and the specifying meaning would be expressed using genitives, adjectives or a relative clause.
ergā has a totally different meaning and expresses the object, and especially the person, whom a (usually good rather than bad) attidude or a state-like action is directed towards: nihil ergā eōs agere 'to do nothing in relation to them', amor ergā parentēs 'love towards one's parents'. It has no adverbial or disjunctive uses, but is a pure preposition that depends on some (de-)verbal part of speech, similar to in and antonymous to contrā, with adversus somewhere in the middle.
I can't think of instances where the two are interchangeable.
Erga is a preposition; quoad is an adverb.
Roy J. DeFerrari, A Lexicon of St. Thomas Aquinas, p. 370:
ergā, prep. with acc., in general of every kind of mental relation to a person or thing, to, towards, in respect to.
Eliguntur homines ad aliqua officia vel secularia vel ecclesiastica; ab his qui nihil erga eos agunt*, PS. Q. 13. Art. 4 ob. 3 […]
*Freddoso transl. PDF p. 1036: "Men are chosen to certain offices, whether secular or ecclesiastical, by those who do nothing with respect to them."
Alt. transl.: "men are chosen for certain posts, whether secular or ecclesiastical, by those who exercise no action in their regard [or 'regarding them']."
quoad, adv., (1) with respect to, as to = quod attinet ad (with the acc. only, in the S.T.), (2) till, until.
(1), sed per extrema unctionem non remittitur peccatum quoad maculam sine contritione, quae etiam sine unctione remittit; nec iterum quoad poenam, quia adhuc si convalescat, tenetur perficere satisfactionem iniunctam; nec quoad reliquias culpae, (ob. 2) […] PTS. Q. 30. Art. 1
(2), et similiter de homine aliquo iudicium perfecti dari non potest, quoad eius vita terminetur, eo quod multiplicia potest mutari de bono in malum, aut e converso, PT. Q. 59. Art. 5 c.