RFC 4871 was obsoleted by RFC 6376 in 2011, which was updated by RFC 8301 in 2018.
While the statement about the possible length constraints still holds, the key sizes have changed:
Signers SHOULD use RSA keys of at least 2048 bits.
Verifiers MUST be able to validate signatures with keys ranging from
1024 bits to 4096 bits, and they MAY be able to validate signatures
with larger keys.
4096 bit is still not required for security reasons, but it should be usable by now. Personally, I’d go with 2048.