I started to take a look at this - it's a fair amount of work if you don't go with a Stripe-hosted page (the current checkout page we have is an embed into ITFlow rather than Stripe hosted, so would make sense to keep this the same - it just looks & feels better).
Looks like we first need to create ITFlow Clients in Stripe as Customers (as your script does @jordan2908) and then we can use the Setup Intents API to save cards details. Once both of these are done, then we can look into a way to allow a client to use their saved card / auto-charge invoices against it. We'd also need a way to track consent for cards to be saved/auto-charged.
It's not exactly a short process. These docs just cover saving a payment method: https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements, I'm sure there's additional docs for actually using that method (both in a user-controlled and automated way).
Would be pretty cool to add though!