Did you try using STACK?
I wonder if it's possible there.
I looked up what STACK is, and it looks interesting. However, from the online videos it seems to be missing some features from Webwork like MathQuill for example. I am not sure what is possible in it and how flexible it is though. They seem to be using Maxima to give feedback to students, but I don't want the CAS to have so much power. I want to use the CAS to compute things and then give feedback to students based on my own computation. One main reason for this is that I think the CAS might be pretty stupid in a lot of scenarios to give any meaningful feedback.
They have these trees as a way to do step by step problems which you can do by making a nicely structured Webwork problem. In general, from my limited time looking at this, it seems like STACK tries to make problem creation easier by simplifying and also restricting the problem creation process. Which would make the stuff I am trying to do even harder, if not impossible. Webwork is extremely flexible compared to STACK in this view.
Webwork could think about integrating the CAS part of STACK though. It seems that they already have exactly what I am describing here in the background, but use it for different purposes and have a system that doesn't allow the freedom that Webwork does at the moment.
Things have changed a lot since then, and I see the value of having access to a CAS from within WeBWorK problems. As you pointed out, there is some integration with Sage available, and there is also integration with R available. I haven't really played with the Sage integration, but I know that you can access R from within an answer checker.
I think you've hit on the biggest challenge, which is getting the syntax to play nice between the two systems. MathObjects generates both a normal string and a LaTeX string for any object. For Formula objects the normal string is basically "calculator notation", so I would expect that this could be passed to a CAS as-is and be interpreted correctly, and as long as the CAS outputted similar notation, the output from the CAS could be passed to Compute(). If you have specific needs or ideas you can post them here or as a GitHub discussion.
Looking quickly at your sample problem, some of the things you are doing there could be useful as methods in PG. For example checking that two functions are equivalent up to an additive constant is already available as an answer checker, but not as a standalone method within a custom checker. Your checkMultAdd is virtually identical to a code snippet that I use in differential equations problems, so making this a MathObjects method could be useful as well.
With WeBWorK being open source, if you have improvements that you have made to the code, please submit a pull request on GitHub so that they can be considered for inclusion in the code base.
The UNL math department will most likely contribute our own problems and methods in the near future to be considered for inclusion in the code base. Some people have started using some of my partial credit checkers in the department here, and it only makes sense to make them available instead of copying them from course to course.