Whoa, whoa, whoa. You're doing something very wrong if you've lost track of $100,000s of payments.
In the early years, aggregating staff time sheets was manual and easy to put off. We ended up building https://usepunch.com to handle that which is a massive help.
In web development and with 100+ clients, it can be quite difficult to track things like hosting and domains when they're spread across multiple providers, renewing at different times of the year, etc. We ended up building an internal web-app that interfaces with Xero to help manage this, but this was 18+ years in...
And yeah, I can appreciate I've done something very wrong. I've found that all too easy when spread so thin.
After that I phoned after every invoice - which was a pain in the ass for me and for AP, but the money (mostly) arrived on time.
It's really, really easy to miss how important admin and cashflow are. They're boring AF, but also too important to ignore.
Even worse is the realisation that sometimes you are going to be paid late, sometimes you are going to be offered partial payment, and sometimes you may never be paid at all - and these are all absolutely normal in business and you should expect them and have contingencies for them.
As a rule, any freelance work where you rely on timely payment from a single client to cover your outgoings is incredibly risky and dangerous and can easily become very stressful - because you are literally flirting with financial death.
I'm not saying it's impossible to do it OK, I'm saying it's easy to get it wrong and fall behind. I mentioned the idea of an opinionated business framework to a friend (freelancing very occasionally 1-2 years) and they said "Oh YES, absolutely." And that's for someone who'd send 2-3 invoices a month, not 50+.
It's great that you could do it.
And then you learn to spot warning signs, and avoid clients/projects like that again in the future. Getting some deposit up front is often a good thing, but also not something you can always manage. I've done work for govt agencies - that's generally not going to happen, but once I have a contract or PO, I've got a pretty high confidence the money will come through - it just may take weeks or months to get paid.
If they don't take those terms, then they don't get your services.
If that means you have to wait tables until you find a few legit clients, then so be it.
In my experience the vast majority of businesses will not entertain the idea of cash up front, period. I bet that you wouldn't either. If you were building a house, and the builder demanded cash up front, you'd laugh in his face.
Finding good clients is important, but if you demand to be paid in advance, get used to waiting those tables because you're going to be doing it a long time. Note: you will not be paid in advance for waiting those tables, either.
If you’re doing work for clients upfront without a deposit, you are taking a huge risk. Which is probably why out of more than $2 million billed, I’ve only had a single client not pay me, and that was a startup that went under completely.
Then the time-tracking component would strongly warn against commencing work until the invoice was paid, etc.
So, basically, a very opinionated business framework web app.
That's how a lot of builders work - if you're having a custom built home, you're going to need to put down a deposit.
It basically happens in real time, but a weekly check is still tolerable compared to net-60.
Building specific frameworks/systems to work within is absolutely the solution IMO. So, like Xero but with a focus on an exact industry/locale. One-button follow up of unpaid invoices, automatic setting aside of money for paying taxes, automatic advice on rates. Too often, people try to fit the tools to their way of working when I think they'd be better off fitting their work to the tools.