To solve it;
Security.addProvider(new BouncyCastleProvider());
https://github.com/apache/pdfbox/blob/3.0/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignatureBase.java
ContentSigner sha1Signer = new JcaContentSignerBuilder(XXX).build(privateKey);
where (in my case) for domain certificates, XXX= "SHA256WithECDSA"
PS, one can find the working project at https://github.com/tugalsan/com.tugalsan.blg.pdf.pdfbox3.sign/tree/main