Manufacturers usually prescribe the maximum allowable wear, resp. the minimum allowable thickness, of the pad. That includes some safety margin and you can indeed go much farther, but at your own risk.
One of the pages that summarize these limits is https://bikeco.com/mtb-brake-pad-wear-limits/ Shimano allows to go to 0.5 mm of the pad thickness. Again, some people will go to almost 0, but at their own risk.
You also have to consider that the wear is often uneven. The minimal thickness should be kept across the whole surface.
You can use a dedicated brake cleaner or isopropyl alcohol or denaturated alcohol to clean them. Some will use a blowtorch or gas stove, I would first just try to burn off the alcohol put on the pad by a lighter.