I am in one of the cases that needs signing a payload with multiple signatures, as case (2) in this answer.
As a reminder, JWT is specified by RFC7519, in which signing is defined to use JSON Web Signature, JWS, RFC7515.
JWS/RFC7515 define the compact representation in Section 7.1, which is widely implemented by libraries. But they also define the longer JWS JSON Serialization in Section 7.2, which allows for multiple signatures of the payload.
The documentation at jwt.io lists a plethora of Java libraries, but is there any of them that actually implements Section 7.2, with the multiple signatures?