All iMessages are encrypted end to end and Apple wouldn’t be able to know the content of the messages even if they were given a court order because Apple doesn’t have access to the private keys to decrypt the message. The only place that has the private keys is your device.