Painting the outside and lip of the case should not do any harm.
A thin layer of hard-setting paint should not affect heat dissipation much, given the overall size of the lamps. It's the only reasonable way to make them look decent without replacing them.
The inside does not look bad, that just needs cleaning & re-assembling, possibly with some silicone grease on the front seal to improve water resistance.
Considering how little of the inner lamp assembly had thermal contact with the rear case (prom the badly applied, minimal, heatsink compound), re-assembling it with a good overall layer will probably allow the LEDs to run cooler no matter what is done to the casing!
(I took ZZOs comment to refer to the inside back, where the heatsink compound would be, which I would not have expected to be painted as the inside looks OK anyway, behind the "glass" level).