The nice thing about these projects is that the community can review what kind of data is collected because it is FOSS. Obviously, things like votes, comments, DMs, posts, and posts marked as read are all logged in the DB and tied to your account. One could extrapolate a lot about a person by extracting and doing data analysis against that data. Because of how federation works, it also means you can't just rely on your instance operators to be trustworthy.
DM's I think operate more like an Email message and likely are not federated in a way other instance hosts, other than the origin and destination hosts, can view. But the Origin host and the Destination host obviously could do a database query and pull your DMs. It should be noted, this is also true of Email unless you are using encrypted mail.
At some point, DMs could be built to be end-to-end encrypted with PGP if the devs/community desire that, but that's not how it works now.
I'm sure that as a Lemmy Instance operator, you can also use your host server to log connections (read, IP addresses), but I'm unsure if Lemmy itself logs that information in its database alongside your account information (probably not?). You would probably want to log the connections as good operators, so you can find patterns and remove bad actors trying to say DDOS your box.
However, if more robust moderation tools were to be implemented, which include an IP-based ban, then that would have to be tied to your account to make it work.
There are platforms like Nostr for example, where everything is encrypted, even the primary content, and you have to provide the system some kind of encryption key to even view the feed.