Of course, people try their luck and contract using their non-German companies, but I've read on some forum that at least one guy was prosecuted (as in criminal charges, not to mention the taxes owed + fines) by Germans for that.
A thing some people I know do is to fly into Germany every week for 3 or 4 days, stay in a hotel/airbnb, and then come back to home country (BTW, talk about carbon footprint of the tax laws...). This way, you have no residence in Germany at all, and also you're there for less than 183 days per year, so they really have no claim to your taxes. Of course, this "bedouin" lifestyle is not for the weak, and the company needs to be open to it (the partially remote work aspect) as well.