If e2e is outlawed, it would be illegal to operate the matrix.org server (which is one of a universe of federated Matrix servers) - but the code would still be legal.
Also, peer-to-peer Matrix is in the works, with working prototypes - the client sort of embeds a server... Enforcing illegal e2e would require going after each user - lots of fun !