There have been racers who were using bikes with hidden electric motors.
Yes, there were a few reasons why the suits were banned, including reduced friction and added buoyancy, as well as turning swimming into a technological race where poorer swimmers and nations would be disadvantaged.
A better example of technology-dominated sport, I think, would be weightlifting. There are some “weightlifting shirts” that are so stiff, that the lifter can’t even lower his arms unless he’s holding the barbell. The shirt, in other words, is stronger than the athlete.
I don’t think legalizing doping would lead to safer drugs. If there was a safe drug that boosted performance 50%, and another drug with side effects that gave a 51% boost, athletes would take the second one every time. There is pressure (competitive and financial) to be the best. There is no pressure to be safe, unless the governing bodies force it to happen.