Sorry, but as a non-EU national you’re not allowed to work for anyone other than your employer. Your permit is tied to them and doesn’t allow you to work for anyone else.
Unless your permit authorises you to perform such freelance work, which would be unusual for a non EU citizen, then you will have bigger issues than taxes if you get caught. Any whether or not you get caught or someone reports you is an unknown.
And of course you should have authorisation for your employer as well.....
Your permit is most likely tied to your employer. As a non EU you just cannot start another job without approval. Because in principle for that 30% your permit is not valid, your permit is approved to work only for that company, not for another.
I know nothing, but with my common sense the Swiss permit is only for work within Switzerland. The work permits were designed to protect the local Swiss job market. I guess technically OP could live in Switzerland only for 70% of the time according to his Swiss work contract. Now, the possibilities to work remotely, virtually anywhere make some interesting challenges for outdated rules.
At the end of the day you have to decide if it is worth the risk of having your permit cancelled and being recorded on the Schengen System or not. You may get away with it or not, it’s something you have to decide.
No - does your contract with your employer allow you to work for someone else
No - you can't do it. Stop.
Yes - you can do it.
Or - if your permit is not tied to your employer, and your contract with them allows other work, then you can take this extra work.
The tax is due where you perform the work. If you are in Switzerland, the tax is due in Switzerland. If you are paid into a foreign account, that's tax evasion which is civil offence and leads to penalties and interest. You should declare the foreign income on your tax return.
I think you should first find out whether your work permit is tied to your employer - highly likely but given that you are on a 70% contract, you may be pleasantly surprised. Ask your employer - am sure they will not look at you askance for wanting to do something to use up the 30%.
Keep in mind that if working for a US company, OP will receive a W-2 wage and income statement and that means also filing US taxes. That may or may not involve paying any tax, one would have to study on the dual-taxation agreements between CH and USA.