Is it possible to do a mass replacement of aging vehicles?

Go into Advanced Settings, then Vehicles, then Autorenew. Turn on "Autorenew Vehicle when it gets old", then set the other two options in that menu to the values of your choice.

I believe that vehicles will only autorenew when they pass a depot during their normal routes, but I haven't tested this.

Autorenew feature of OpenTTD