Yeah you can train a cat to do this but it seems like unnecessarily trying to make your life easier or as a cute trick. Using litter and digging is much more natural especially compared to perching on a slippery little ledge. And if someone leaves the lid down you have a confused cat who doesn’t know where to go. Jackson Galaxy and almost all other cat behaviorists are against toilet training.
If you’ve ever dealt with a cat with inappropriate urination you know you don’t want to do anything to mess up a good litterbox routine so this kind of training is just asking for trouble and can be really upsetting for a cat.
Just scoop your litterbox and realize that sometimes having an animal in your house is going to require cleaning up a bit of tracked pieces.