Trying to make an algorithm that can't infringe copyright makes about as much sense as trying to make a pen that can't infringe copyright.
Algorithms are capital expenditures, that is, they are owned property. They are tools, and it is inconsistent to treat them differently than other tools. I suspect that we aren't going to get there by saying "this algorithm can't violate copyright"; only through saying, "you, human: you can't make money violating copyright." https://mastodon.social/@baldur@toot.cafe/111669090452900073