I guess that diving could work if it is judged purely bu some kind of computer algorithm or something. Otherwise all competitors will just have to wear sparkly costumes.
The judging in boxing at the Olympics has long been held to be dodgy; I remember a lot of disquiet around the results at Los Angeles for example. But it isn't artistic, even less so in the amateur game. But boxing is a success without the Olympics, like football and tennis, so I think it could leave and not take a significant hit to its popularity.
Computers algorithms are just coded prejudice. It might be consistent but it still wouldn't be objective in the same way time is, even allowing for the screw up with Peaty's world record.
There have been various attempts to reduce the corruption in boxing which revolve around similar approaches to other sports including diving which revolve around the reducing of the influence of individual judges. So in the Olympics it's about valid hits as judges by the majority of judges recorded in specific times.
Football and tennis existed for years outside the Olympics. Boxing is both an original in the Ancient games, and been part of every Olympics since 1904 except 1. It's history in the professional sport is littered with Olympics winners. It might well survive without the Olympics but it has a very different relationship with them than tennis or golf.