JTAG is hard to do. RP PIO (USB FS), TI PRU (bad toolchains), or NXP FlexIO are really required to do it correctly (or you can do it "okay" with a capable SPI controller.)
Here's an Arduino project to program CPLDS/FPGAs using XSVF files https://github.com/wschutzer/xsvfduino
I'd say that the cheap programming cables are abundant and already compatible with the vendor tools so there's not much motivation to reinvent the wheel.
Any MCU can bitbang JTAG at 100kHz. Try doing it at 30 MHz sustained.