If digital sensors had unlimited dynamic range it wouldn't matter so much, but we all know that they are limited by their noise floor.
By using the color filter at the time you shoot, you can reduce a particular color channel that might otherwise be blown out while still preserving the brightness of the other two color channels. For instance, if the scene has a lot more brightness in the red channel I can use a green filter to reduce the amount of red without reducing the green (and to a lesser extent the blue) as well.
But today, with digital cameras, would I just instead shoot in color, apply the yellow filter in post (or whatever other color filters I want), and then convert the image to black and white?
Not exactly. Digital filters don't always work the same way that actual physical filters do, and so they don't always give the same results. You may be able to get very close, but there's still no substitute for using actual filters if you're planning on presenting the image in monochrome.
With most raw converters that have a dedicated "Monochrome" tab, the number and color of filters that can be applied are usually fairly limited. The choices are usually something like Red→Orange→Yellow→None→Green. But you often can't alter the density/strength of a specific filter color. If you want a specific color between theses choices, or say you want a blue filter, you're often out of luck.
Dedicated B&W/Monochrome editing applications or plugins like Nik's Silver Efex Pro or Topaz B&W Effects often add many more choices including specific filters in varying strengths. They may even be labeled by the names of their analog counterparts e.g. Lee #8 Yellow or B&W Light Red 090. But they still act upon light after it has been recorded by your sensor, rather than before. So the limitations of a camera's dynamic range will limit how close to using an actual filter you can get by doing it in post processing.
What you set for color temperature and fine tuning along the Blue←→Yellow and Magenta←→Green axes will have an effect, but it won't be the same as using a color filter would. When you adjust the color temperature pretty much all of the colors are shifted in one direction or another. Color filters are much more selective about which colors are affected. You could use the Hue Saturation Luminance (HSL) tool in many post processing applications to fine tune a little more, but you're still unnecessarily limited your camera's dynamic range more than you would by applying the filter to the light before exposure so that you can utilize your camera's dynamic range only on the light that you want to capture.
You can reduce contrast in post, for example, to mimic the effect of a blue filter but it may not give you the exact same effect. Again, you are also sacrificing dynamic range by applying the filter to the digital information after it was recorded rather than to the light before it was recorded. The closer one can get the light to like what one wishes it to appear in the final image to look like before it strikes the sensor, the better the image quality of the final image will be in terms of things such as noise, color banding, etc.
If you add that green filter to prevent clipping of the red channel, do you apply an inverse filter in post (after the range limiting camera) to get back to the original scene? After all, that green filter changes the look of the image.
That's the whole point! You change the look of your image by reducing the light before it is recorded by the sensor (or film, for that matter). Then you are free to utilize the entire dynamic range of the sensor on the light you wish to record, rather than throwing away half that DR in post to get rid of the red that you don't want.
Because a channel might be clipping. I'm just trying to understand your answer. Say for example if I want to photograph that nice flower and notice the red channel is clipping, your answer suggests using a green filter. Now the red channel doesn't clip any more, great. But the colors of the flower are all wrong. To correct that, I guess I'd have to reverse the effect of the green filter.
If the red channel is clipping but you want the scene to look the way it is, then you reduce exposure and you are done! No need for a filter of any kind! Only if you want the scene to look the way it does with the green filter applied would you use a green filter (analog or digital)! If you shoot without the filter you still have to reduce exposure to keep the red from clipping. But then in post you have to push the greens (and to a lesser extent the blues). That also pushes the noise in the greens and blues.
By using an analog green filter when you shoot, you can expose the greens (and blues) brighter and still not clip the reds. So the colors you want in the final image are not too dark and then need to be boosted in post along with the noise. The image then looks the way you wanted it to when you took the photo using the camera's full dynamic range instead of only using a portion of it as would be the case if you had to underexpose the greens to keep from clipping the reds because you didn't use a real green filter.
The major point of the question: For images that are to be displayed as B&W/monochrome. You shift the colors to adjust the various shades of gray produced by various colors when displayed in B&W or other forms of grayscale. When we say "boost the green" in such a context we are saying "make the green objects in the scene look a lighter gray than equally bright red objects in the scene" or "Make the dim green objects in the scene as bright a shade of gray as the bright red objects.
Even in b/w it might be desirable to represent the b/w version as is. See, this is why I made that comment. That first paragraph of your answer reads to me like: "use a filter to prevent clipping" and I thought just underexposing as you suggested in your comment now would do the same job without a filter and the color shift it introduces.
Then just expose it correctly and that's all. Use no analog filter. Use no digital filter.