I know people use Glyptal__electric motor insulating varnish__inside engines with good results, but that wasn't my experience. One of the engines I built for my car, sometime around the early-mid 1980s, I'd had a block "tanked" took it home and thoroughly washed it before applying aerosol Glyptal.
All the assembly work went as planned, and when I drained the oil after some period of use (100 miles? 1000 miles?) and could see flecks of the stuff in the oil. That was nothing compared to the amount of it packed into the spin-on oil filter; the filter had to be bypassing most of the oil!
The engine came back out, and the bearings were inspected__all good__and what little Glyptal remained was easily stripped and the engine buttoned back up.
You can do what, but that put an end to me using the stuff on any of my work.