According to RFC8894 Section 3.1 messageData should be encrypted using the challengePassword if recipient's public key is not encryption capable. Currently the PkcsPkiEnvelopeEncoder class constructor requires a X509Certificate as recipient but this will fail using a ECC key.
Solution would be to implement an other PkcsPkiEnvelopeEncoder or extend the current to allow using the challengePassword and an key derivation option. Then during getEncoder in Client class if no recipientCertificate is returned a fallback using the challengePassword for encryption could me implemented.