Your second case is correct. That pious Catholic may be liable for civil penalties but wouldn’t incur a Church censure.
As for your first case… couple problems. The atheist technically cannot receive the sacraments as soon as he repudiates the faith: he has committed the sin of apostasy with the latae sententiae excommunication attached. Whether or not the Church notices this is another question. Ordinarily, he would just walk away, without giving formal notice to anyone. He stops going to Mass, and the parish priest thinks oh, he is inactive/lapsed/moved away. Now in the 1917 Code of Canon Law, this would be known as a de facto Act of Defection. Today, it has no official term and no support in law. Anyway, he is excommunicated, and nobody knows about it, possibly not even him. If he doesn’t know about the penalty of excommunication, it does not take effect. Let’s say that he did know. Let’s say that he had an informal conversation with his bishop where he explained that he repudiated the faith, and the bishop asked him pointed questions which were met with staunch atheism. Then the bishop would be duly informed that this atheist is excommunicated. If the atheist presented himself to receive the Eucharist from the bishop himself, he could be denied. The same conversation could happen with the atheist’s parish priest. The atheist would still be liable for the tax, because the Church has no formal evidence. The atheist would have to fill out the form, write the letter, and make his Formal Act of Defection before the competent authority, and then he would be released from the civil Church tax. His status regarding the sacraments would not change in any appreciable way because he already had a conversation with the bishop about it, but at this point, the bishop has formal evidence and has cause to circulate a memo with the atheist’s photo to all parishes, at which point the atheist can no longer enter any Catholic church in his diocese without being refused Holy Communion. This is hypothetical. I am not saying that the bishop has a procedure in place to circulate such memos. It is highly unlikely, given the need for confidentiality.
To make a long story short, the non-payment of taxes will not directly affect anyone’s ability to receive the sacraments. It depends entirely on their actual disposition and willingness to make a Formal Act of Defection.