That was what the Internet Archive was doing.
They got sued and the last I heard, had lost at every level. That said, I don't know that the lawsuits are over yet.
To be clear, no one claims that IA digitally lent out more copies than it physically had. The publishers argued that IA couldn't make a digital copy and lend that instead of the physical copy.