Especially if it's straight out of China. I just kicked back a fake 11 tablet that was actually 7. The OP advice is only useful if you're running a rom that you can at least audit the source of.
I don't know what phone they're talking about, but PinePhone disables sensors via hardware kill switches, i.e. nothing on the phone can use the sensors because they're physically not connected anymore.
Even something as degoogled as DivestOS will override your permissions and sensor settings to make the dialer app work in all circumstances. So who knows what proprietary apps that many people need might exploit this possibility.
Like you say, unless you physically disconnect the hardware, you can never now.