If you check out the thread I linked to earlier (about rebooting the RadioShack mic), you'll see plenty of ideas for mounting a lavalier mic. I still have the one I modified, which is self-powered with a rechargeable battery, and I cut off the crazy 20' of cord and soldered a female 1/4" connector on instead. I haven't used it in maybe 2 years, but I might give it another go now that I have two other basses I could use it with. Sticking it inside the f-hole did not work well with my Engelhardt; it sounded boomy and muddy and not any better than a piezo; but it did work nicely mounted to or near the bridge for outdoor gigs with a folk band (during the pandemic when all my gigs were outdoors). IIRC, I used putty to experiment with sticking it to different parts of the top of the bass and bridge.
I play with several gypsy guitar players now that use lavalier mics--I think most or all of them are using some kind of AKG with a battery pack; I can check at my next gypsy jazz gig. The mounting method is all the same: a tiny square of velco attached to the guitar top (~1"), a tiny cube of foam with a piece of velco. The mic goes into the foam and the chord goes through the guitar strap.