There might be something for each OS that could perhaps be polled via the OS class, but each OS likely has it's relevant executable or API to run for determining this. It might be worth opening an issue on the proposals repo for a feature request tho.
I don't see this as any more of a privacy violation than checking for input devices like gamepads tho. Seems like a valid enough feature request.
As for getting input from a mic or webcam or such where there'd be a genuine security and privacy concern, that's a whole other matter and the security layer for such is up to the OS. On linux sessions running wayland user would likely get a password prompt to give permission for the relevant portal to be run by a specific application.