this is a 'best guess' answer, the best i can do online.
you should set yourself up to see a psychologist, not a psychiatrist, and when you do, you want to be sure to find one that does something called COGNITIVE BEHAVIORAL THERAPY, a technique that will allow you, over time, to knock this down and control it so you do NOT get to the point of running into trouble with the law.
i believe what you have is called COPROPHILIA, you can find it in this link here on a group of disorders called PARAPHILIAS.
i think you will see when you read this why i say what i do about your issue. i think you are wise to ask about it and would be even wiser to seek treatment to minimize or eliminate it as it could get you in trouble if it gets worse or increases.
that being said, it appears to be rather benign, if strange, and you have INSIGHT, which is great... meaning you recognize it as being out of the norm. this is a very good thing.
I am standing by if you have any questions.