The color temperature represents the color of light emitting from an
ideal black body, when heated to said temperature in kelvin
Correct. But the bulb's color temperature may not coincide exactly with the filament temperature. Standard bulb glass absorbs ultraviolet light, which skews the color temperature lower. However we are usually only interested in visible light (ie. what the human eye sees) so this has little practical effect except in situations where the proportion of ultraviolet light is important.
Does this mean a 5000 K incandescent bulb has higher filament
temperature when powered than a 3000 K?
Not necessarily. An incandescent filament run at 5000 K would produce much more visible light for the same power input as a 3000 K filament, due to the larger proportion of energy radiated in the visible region. But it would quickly burn out.
So how are 5000 K incandescent bulbs a thing? By placing a 'blue' (actually cyan) filter over the bulb. This increases the color temperature by absorbing longer wavelengths. Here is an example:-
OSRAM COOL BLUE ADVANCE H7 5000K
This bulb puts out less visible light than an equivalent unfiltered bulb of the same wattage.
Now you may ask, what is the point of making a headlight bluer if it reduces the light output? Wouldn't that just make the road ahead harder to see? Not necessarily. Most of the human eye has a higher density of rods (monochrome sensors, more sensitive to green light) than cones (color sensors), and the rods are more sensitive at low light. 5000 K is closer to daylight, so objects appear closer to their expected colors than they would in 'warmer' light. Filtering out excessive red light makes the perceived image sharper and easier to see, particularly in the peripheral area that is important for driving safety.