My prior post was unduly negative. I am exhausted. The procedure that you are referring to is, in California, called a demurrer. (There is also a motion in arrest of judgment.) In Federal District Court, it is a motion to dismiss for failure to state a claim.
You are correct in that when you are asked to enter a plea, you must raise all issues of sufficiency and jurisdiction, or they are, with some exceptions, waived.
I know California law and procedure thoroughly. I am dealing with judges who are full throttle renegade. On Thursday, the day before the contempt hearing, I filed a Younger (1971) complaint in federal district court. The record that the State Court is giving me is perfect for a Younger (1971) action.