> You're proposing using capital ships--ships of which even the largest numbers had single digit numbers--to escort convoys. This takes them out of the action for any other offensive or defensive naval operation you might want to use. Instead, you'd use destroyers (of which you have hundreds) and cruisers (merely dozens). This also lets you have several escort vessels per convoy, which is superior because two ships can be in two places at once which a single ship cannot.
The Allies (mostly the US) built lots of escort carriers, precisely for escorting convoys (be it "normal" convoys or invasion fleets in the Pacific), and AFAIK they were considered pretty successful and took some of the glory of winning the battle of the Atlantic. But yeah, you can, with some justification, argue that escort carriers aren't capital ships.
> The Germans did attempt using surface ships to raid convoys, but their record was absolutely abysmal
IIRC the German auxiliary cruisers (HilfsKreuzer) were considered pretty successful, as they were cheap and since they were just converted merchant ships with guns etc. hidden they could often get quite close to a target before revealing themselves. But these were used for picking off lone merchantmen, not convoys.
> it's pretty universally agreed among naval historians that not building those ships would have been better for Germany.
Yes, the German capital ships were an almost complete waste of resources. Those resources would have been much better spent on, say, u-boats and land-based aircraft. I guess the only positive return Germany got from them was as a sort of 'fleet in being', in that their mere existence forced the allies to commit their own capital ships to the area in case they turned up to attack some convoy.
Of course, had the Germans not built their own capital ships, the Allies would have also reacted, e.g. by not building or stationing their own capital ships in the area, and spending more resources on, say, anti-submarine efforts. So I'm not certain the battle of the Atlantic would have turned out any different in this case either, just even more bloody.