If quantum computers become practical, both RSA and ECC will be completely broken. You would need to use post-quantum cryptography to be safe in that case. Note that since these algorithms haven't received as much scrutiny as RSA or ECC, it would be unwise to trust any of them entirely. Instead, you should use two layers of encryption: one conventional and one post-quantum.
As for which is more secure otherwise, algorithms such as https://crypto.stackexchange.com/questions/31439/how-do-i-get-the-equivalent-strength-of-an-ecc-key can calculate a security level (though this is solely measuring processing time, and has no bearing on how likely a "break" of either system would be). Those calculations seem to indicate that RSA-4096 is slightly stronger than Curve25519.