“We could encode the money so it can be read by a scanner.”
I think we are already there. Doesn’t new money come with a flat plastic/metal thread that can be read by scanners?
The slot machines on the cruise ship read all bills except $2 and new $5 bills on my last cruise.