Generally speaking must late fees have some sort of cap or limit? For example if it were the libraries policy could they really charge $100 per day for unreturned books? A more realistic example, often contractors have a late fee for late payments. Could it accumulate indefinitely (for example $10 per day) or must it be a flat rate or have an upper limit (for example it stops after 14 days)?
Fees, damages, fines and penalties
A library late fee is probably not a fee - it’s either damages or a fine.
A fee is an amount charged/paid for the provision of a service. An architect charges a fee to design your house. The DMV charges a fee to issue your drivers licence.
Damages are what you pay to compensate someone for harming them. The harm can be physical or economic, and can come from breach of contract or a tort. Late fees charged under your contract with the library are to compensate them for you breaching the contract by not returning the book on time. When a specific figure is in the contract to start with, this is called liquidated damage. The figure must be a genuine pre-estimate of the cost to the library for a beach, if not, into a penalty (q.v.).
Fines are what a government charges you when you break the law. The fine can be any amount that the law allows. If your library is a public library then the late fee may actually be a fine. If so, it must be no more than the amount legislated or regulated.
Penalties are attempts to punish someone for breaking a contract. Damages become a penalty when they are excessive and punitive rather than restorative. Penalties are unenforceable.