Are you pulling the motor out to do this, or trying to do it in the A?
Do not know the answer. How about rags soaked with Rust 911, evaporust, or thermocure? Let the rags lay pressed against the surface. Not acidic and supposed to be safe for all materials, not sure what it would do to paint finish.
also unsure if it can be cleaned/prepped properly for good pain adhesion.
Might want to do a compression/leak down test 1st, maybe do an exhaust gas block test. Now is the time to find out if the head needs to be removed to correct any top end issues (like a weeping head, blown head gasket, etc) before you paint.
https://www.amazon.com/Block-Tester-.../dp/B06VVBSFTF