Not comparable. You don't need to be DBS checked to go to the bog.
Going by that logic EVERYONE should be DBS checked before taking a wee as we aren't sure who is safe or not in there, male or female, just like in a school.
No, we don't DBS check everyone using a bog because that would be stupid.
What we do do, is have sex segregated toilets, which men, even the men who are lovely and are not a danger to women, aren't supposed to use.
Is it perfect and risk free? No, of course not. Neither are DBS checks.
But the alternative is to simply do away with the safeguarding aspect of toilets altogether and make them mixed sex, with any male who says he is female being allowed access.
Which is akin to removing DBS checks because 'we should just take people at their word and also some people will slip through the net anyway so we might as well do away with the entire safeguarding thing altogether'