Whenever you're using any encoding that uses the target, you'll want to make sure that you're careful about not using leakage. Especially if you're using cross-fold validation you'll want that encoder to be "trained" only on the portion of the training data for each iteration. This is where you might use sklearn's Pipelines to help.
Specifically to address your question, my favorite technique for pairing with Logistic Regression is Weight-of-Evidence encoding. I typically like to add some random noise as well. If your dataset is small, or your categorical variables have extremely high cardinality, you may not get the best results. However, this is my "favorite" method of encoding that pairs especially well with Logistic Regression.
One of the best packages I've found in python is CategoryEncoders.