I suppose it could still be done as a read-only display of content …
If the content is hyperlinks / torrent links to copyrighted content, then even a read-only copy is illegal. Lemmy (by virtue of ActivityPub) isn’t designed to access stuff remotely - the closest it could probably come would be to have links to the posts on the remote community, though adding a level of indirection is probably not enough to become legal.
If you want to do illegal stuff on the internet, you need to use services that are hosted where it isn’t illegal. People yelling about freedom doesn’t change the fact that admins aren’t willing to go to jail for your warez.
Nature knows how to solve this problem.