Question:
Answer:
It’s possible that participating in Mass could do so, but not necessarily. To be clear, temporal punishment is only removed for sins regarding which a person has repented and been forgiven. For mortal sins, that means receiving the Sacrament of Reconciliation/Confession.
To have all temporal punishment removed, one needs a plenary indulgence, the conditions for which include Confession, the reception of the Eucharist and detachment from all sin. In this light, simply faithfully participating in Mass could remit some temporal punishment. Ultimately, we entrust the matter to God. If we have any concerns, we can seek a plenary indulgence, given the Church’s God-given power to bind and loose (Matt. 16:18-19).
For more on indulgences and the removal of temporal punishment due to forgiven sin, please see CCC 1471ff. and also “Primer on Indulgences” tract.