>>mtlync+kf
Could you simply use an iframe with a sandbox attribute? Idea being you dynamically create an iframe, fill it with content (styles, postmessage scripts, what have you), then dynamically set a semi-restrictive sandbox before loading Stripe's library. When you're done (i.e. have a payment token in the parent) just remove the iframe. This way everything Stripe related is sandboxed and the script is unloaded as soon as you're finished with it.
Good chance I'm missing something, or there's some kind of protections in place around this.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/if...