You have only two options with the fish in this tank. Either re-home all three of them (the loach, the red tail shark and the skirt tetra) or add more of the tetra species and the loach. The RTS should go, period, this is only asking for trouble.
Tetras and loaches are what we term shoaling species. This means they live in groups, and this need for the group of their own species is part of their genetic makeup, their DNA. When this need is denied them, they have few options. One which is the most common reaction, is to become much more aggressive. The other is to become so weakened by stress they worsen until they usually die. When fish are kept in too small an aquarium, they often develop similar issues. So while they may appear to be "OK" now, it is a scientific certainty that they are not, and eventually something is going to give.
The tetra needs a group of at least 10, preferably a few more. This could work in the 40g tank.
You call the loach a "zebra" but this common name is applied to at least two very different species, maybe more for all IU know, so we need the scientific name. There might be space in a 40g or there might not. Loaches need at least five, though a few more is better, but for most species--again I do not know which you have--five may work. The RTS is not going to be happy with loaches in its territory however, regardless.
I'll post a photo of one "zebra" loach, the species Botia striata. This is one of the more peaceful of the botine loaches, and a group of six could manage if your aquarium is no less than 3 feet (90 cm) in length, with lots of chunks of wood to provide shelters, and a sand or very fine gravel substrate. If your loach is the other much larger and aggressive species, it will not work here at all.