Engine paint

Spray oven cleaner will remove most paint, and grease from your engine block. Be sure to rinse with water & vinegar to neutralize the caustic. Once good and clean, wire brush off as much rust possible, and use spray “engine paint” from the paint aisle at a parts store. Several light coats of paint are better than one heavy sagging mess of a coat.

The reason your paint pealed was because or oil or grease was not fully removed, and possibly you forgot to use high temperature engine paint.