My teacher always said, reality is your interpretation, you are in control of your perspective.
Buddha said, you should be in control of your perception enough to be able to see repulsive in the attractive, and attractive in the repulsive. Buddha said, this is done by 1) "fabricating a fabrication" and by 2) "looking with equanimity". Buddha spoke about "proper attention" and "guarding the doors of the senses".
When you see an attractive woman, if you shift your attention and think about unattractive aspects, such as menstrual cycle, bowel movement, skin disease, STD, hysterical scandals, the process of giving birth etc. in connection with her, this is called "fabricating a fabrication".
My teacher said, the reason we like certain people is due to our stereotypes. We have some "types" or generalized images that we are attracted to, and the reason we find them attractive lies deep in our basic emotional experiences. In terms of Buddha-Dharma (and modern semiotics) we like people that have certain "signs" that we recognize because they trigger certain memories.
If you look very carefully at what goes through your mind when you're looking at an attractive (to you!) woman, you should be able to see the memories/stereotypes/prejudices that get triggered. For example, a woman could remind you of your own mother back when she was very young, or maybe her body language and voice look like they promise to soothe and cradle you etc. This is just an example, you should look at your own mind to see how it works.
Once you are able to see your triggers (attachments, stereotypes), you should be able to work with them to let go. Once you let them go, your interpretation of what you're looking at will change, and you will no longer be attracted to those particular signs.
So when you look at the situation scientifically, in terms of psychology, phenomenology, semiotics etc. - this is called "looking with equanimity".
These two techniques are called "controlling your perspective" or "the proper way to apply your attention".
Finally, in Mahayana we recognize that all attraction and repulsion is based on One Fundamental Assumption. It is assumption that "Something Outside of You Can Make You Feel Good". This is called the Root of Ego. Everything you feel, see, and experience - pleasant and unpleasant - comes from your mind. So all these pleasant feelings you think you feel when engaging in sex - they actually come from your own mind. Therefore, it is incorrect to impute (assign, project, attribute) these sensations to an "external object". In fact, external objects are also the constructs of your mind. And your mind is nothing but an ephemeral interplay of natural forces interacting from the beginningless times. So "external" and "internal" (aka object and subject) - are not two separate things. There is no "you" looking at "woman". There is only experience, which is the nature of mind.
Once you understand that there is no "you" watching it, and there is no "woman", - once you clearly see that this is like a dream that's dreaming itself, the attraction will be cut at the root. Then there is no way it can arise anymore.
So yes, craving is not "inevitable", it's absolutely possible to stop it.
It does take some effort to go deep enough in your mind to see the mechanism, but once you see how it works, it can be mastered.