The problem was that the internet banking service for my bank (Basler Kantonalbank) does not have an internal transfer button or anything like that. So I just went to the BKB and found out what to do:
When doing the transfer between the CHF and EUR accounts, do it just like a normal foreign transfer BUT when giving the name of the bank, say "BKB Intern" - by saying "intern", this makes it clear that the transfer is internal and no fees are charged (i.e. follow only the exchange rate).
I imagine that this applies to anyone who has an account with a Kantonalbank.
When transferring cash out of the Swiss EUR account to a foreign EUR account, foreign transfer fees (4 Fr.) are still charged. With the Kantonalbank, you also get charged if you take out Euros at an ATM - but since I still have one foot in Germany, this is something I don't really need to worry about.
So there you go. I hope this helps anyone who is in a similar situation.