painting a machined rim
I've had many sets of painted rims.  All of them were painted by a professional whose day job was cars.  I have no idea what the prep and such involved was, but all of them looked great until I cracked the rims, had large rocks take chunks out, whichever.  

Paint is certainly not going to hurt your metal rim, and it may offer it some protection.  Whether or not the paint stays on (which doesn't actually seem to be your question) is a matter involving far too many variables (prep, materials, care, conditions) to answer.  Unless you are planning to use some frightening type of paint I haven't heard of, you won't damage the rim by painting it.