Illegal would by a hyperbole. But the noose is tightening a bit.
There are upcoming limits for cash transactions (10K, countries can opt to go lower), and strong requirements for identity verification at 3K or more euros in cash.
See: https://www.deloittelegal.de/dl/en/services/legal/perspectiv...
EDIT: The other side of the coin is that banks are _required_ to give legal residents of a country a basic account that can be used for payments.