Do you have a source for the iMessage story? Surprised I haven’t heard about it before.
But that doesn't match OP's description very well. It was a grand jury subpoena and only for metadata.
"As the Justice Department investigated who was behind leaks of classified information early in the Trump administration, it took a highly unusual step: Prosecutors subpoenaed Apple for data from the accounts of at least two Democrats on the House Intelligence Committee, aides and family members. One was a minor."
"Apple turned over only metadata and account information, not photos, emails or other content, according to the person familiar with the inquiry."