[when all businesses are required by law to refuse cash?]
That’s pretty much where I believe it will happen.
Though it will happen at the bank level first, IMHO.
A law determines that digital currency is the only “legal” currency and that cash must be used by a certain date or the banks will be under obligation to refuse it as worthless paper / coinage. ATMs as currently known, would cease to exist.
Except maybe ATMs to recharge a token / your cellphone (as pictured in one set of my Amazon pics - I’ll have to look to see if it’s in the set I posted)