That's the formula for saving throw DC, not CR. I believe that typically, yes, a magical trap has a CR equal to its spell level. In my experience, however, a magical trap will either succeed 100% of the time (versus a party without access to Detect/Dispel Magic) or it will never work (versus a...