I don’t do much with metal parts, just photoetch and the occasional “White Metal” part. For photoetch parts I generally just scuff it with some fine grit sandpaper and then shoot it with acrylic. Acrylic seems to be more flexible than enamel and tends to stay put relatively decently. Not great, but it works pretty well. I have masked it afterwards using Tamiya tape, but I always hold my breath when I pull the tape off.
Probably the best way to do it is use some primer that adheres to metal. Something like automotive primer would probably be best. That would give the acrylic something to adhere to.
I don’t really know how effective it is but alot of people say vinegar will etch the metal and is a good pre-treament for painting. I’ve done this and couldn’t really tell the difference.
I also “bake” metal parts after I paint them if they are not attached to plastic. This is effective.