I now want to replace it with an External HDD connected via USB through the Time Capsule to act as the Time Machine backup for all the computers on the network.
I would not recommend that you do this. Several reasons.
1) If the hard drive has failed on the Time Capsule, this indicates that the product is likely 4-5 years old, maybe much much older, so the electronics may be starting to head downhill as well. If you can tell us what model number of Time Capsule you have, we can tell you a lot more about how old it might be and if there are any particular troublesome aspects about that version of the Time Capsule.
2) The USB port on the Time Capsule is an ancient long of out date slow USB 2.0 design. On top of the that, the internal processing limits the speed at the USB port to about half that of normal (slow) USB 2.0. So, you will discover a new meaning for the word "S---L---O---W" if you decide to give this a try.
3) Because of the old of date design of the USB 2.0 port on the Time Capsule, it may or may not work well with newer USB 3.0 hard drives.
4) The USB port on the Time Capsule is underpowered. It is very likely that you will need to add a powered USB hub to the Time Capsule.....even if the hard drive has its own power supply. This may be one of the problems that you have now.
Sorry that this information may not be what you want to hear, but it might be important to understand that at best, your backup plan is going to result in very very slow performance......and......this type of setup is going to be a lot less than reliable.
If you want to back up your Macs over a network, I would suggest that you take a look at a good NAS product, like Synology. Otherwise, the simplest, fastest, and most reliable backup method is to simply connect a new external hard drive directly to your Mac(s).