An extendable magnet will work, but if you want to maximize your search time covering the territory of where a small screw can get to, you’re better off going with an old-style fly swatter with the wire handle and plastic flapper.
By placing flat rectangular ceramic magnets back-to-back all along the bottom edge of the plastic flapper, you can make a 4”-wide sweep with every probe. And, the flexibility of the plastic flapper will aid in getting into hard-to-reach areas. When you absolutely HAVE to find that little screw, you need all the advantage you can get.
Any thought of using the modified fly swatter to swat a fly will disappear shortly after the first time of using it to swat a pesky fly on your ankle. It will become a dedicated tool for one job only after that time....
CD in Oklahoma