It would be very hard to paint them in place. I did them about 6 or 7 years ago while adjusting the valves. I did another valve adjustment last winter and refreshed them. The paint held up surprisingly well. Like Dave said, don't use paint solvents to clean them, degreaser works fine and is really all you need. Here are a few pics I took over the winter. You can see the first pic shows how well my paintjob held up, but while it's off, why not refresh it and make it better?
20200316_192410.jpg
20200317_130221.jpg
The covers do get hot, but not super hot. I chose Rustoleum because I figured being an outdoor paint, it had to have some heat resistance.