You've got it backwards. The only sane person who would sign such a statement would be an undercover officer. The written statement itself is just more evidence of illegal activity which the officer would just use against the defendant. If a non-officer signs the statement, then they're just creating evidence that could be used against them.

If I were a cop running an undercover operation I'd have my targets sign statements like this and then use it against them. "Why did you sign that statement certifying you're not an officer if you didn't know something illegal was going on?"

There's no way to tell if someone's a cop until they're on the witness stand. Don't risk rotting in jail, spend your time and money fighting for legalization.