There are two places in halacha where this question is commonly addressed: the laws of insects/forbidden organisms in food and the laws of cleaning for Pessah. In both cases the key criteria is visual inspection. The halacha is not concerned with what the eye cannot see.
On cleaning for Pessah
If one is not using the oven on Pesach: The aforementioned process is
not required, one should visually inspect that there is no chametz
that is fitting for a dog’s consumption, and close the door with tape.
On bacteria in yoghurt
The Torah prohibits only bugs which can be seen by the naked eye.
Organisms seen only with the aid of a microscope are kosher.
(cites the Aruch Hashulchan, Yoreh De'ah 84:6 but I haven't checked it)
On bugs in vegetables
We are forbidden to eat bugs that are big enough to be seen by the
as well as from the OU guide to bugs in food
[...] consuming a minuscule insect would not be considered an aveirah
unless the creature is identifiable to the naked eye.
finally on worm in fish by Rav Belsky
any organism not visually discernible by the eye has no meaning in
Also see here for a very interesting article on the halachic impact of the microscope being ... microscoping in light of what is written above. He adds that etrogim and sifrei Torah also do not require more than visual inspection.
But the bottom line is that using a magnifier or microscope to see
something that cannot be seen by the naked eye would have no halachic
bearing “bein lehakel bein lehachmir”
So from all these sources it looks like cleaning followed by visual inspection is the key criteria used by halacha. As always CYLOR for practical cases.