I see the problem you pose. Problems shouldn't force us to do something that is obviously unreasonable. If the right choices are not made quickly things may get so far out of hand, the smart thing cant be done later.
It's not really that unreasonable to try him in the place where his crimes occurred.
First, he is German citizen, so this brings liability to Germany for his actions. Atleast, in terms of the cost of rehabilitation. There are probably a dozen reasonable ways to handle it. Charging California further is not.
Actually, Germany law (like U.S. law) would say that Germany can't try him for crimes not committed in another country. Likewise, if I go to Amsterdam and smoke pot, the authorities in the U.S. can't try me for that, even though I am a U.S. citizen and it violated U.S. law (or would have if U.S. law applied in Amsterdam).
The only limited exceptions are usually crimes committed in international waters or violations of international law (though them, only to the extent the home country recognizes that law).
I can imagine a treaty obligation that requires Germany to try him for those crimes, on the grounds you name (that it's an unfair expense), but only if the U.S. agrees to try Americans who commit crimes overseas or in this case in Germany (we don't).
The bigger problem would be that Germany recognizes a right to due process, which includes a right to call witnesses, and a German court can't compel U.S. witnesses (including the police) to fly to Germany to testify, or compel U.S. police forces to to release documents. If the U.S. hides documents to make conviction more likely (and that sort prosecutorial misconduct is all too common, unfortunately, even in the U.S. where there are consequences for it if people get caught), a German court can't punish U.S. police or district attorneys.
Unless due process doesn't apply (and its a "right" in both Germany and the U.S.) for some reason, it's hard for me to imagine a German judge not dismissing the case.
I think the fix you are looking for, one that would be an easy one, is to bill the German government for the costs of trying and incarcerating him (assuming he's convicted). You'd still need the U.S. to negotiate that treaty with Germany, but I suspect it's doable. Two minor problems are that (i) the U.S. would need to figure how to pass that cost on to the States (so Cali can pay foreign governments for all the trials and punishments of criminals that happen to be California residents and (ii) I suspect the U.S. as a whole would have to pay more money to Germany, on average, than Germany would have to pay to the U.S. That's just a guess though. I suppose a third problem would be that you couldn't have such a treaty with many nations. One can imagine certain parties in places like like Saudi Arabia, China or Russia taking some glee at trying Americans for breaching their laws, then sending a bill to the U.S. ambassador.
We might make money if we had sch an arrangement with Mexico. Hard to say given that the crime rates for illegal immigrants are so low, but there are enough of them that I suspect that would be a net gain.
I actually didn't realize the man was mentally ill...which makes it all the more likely that a German court would reach an outcome Americans would dislike.
On balance, I'd look to the cost shifting approach before a transfer of the case. The latter just seems impractical to me.