It's not really an "App" but tools like ffmpeg or sox or lame can do that no problem. It might take a while to convert your entire collection though ... but depending on the size might just take a night or, few nights.
If you have a ridiculously large collection and do want it "on demand" you could also use e.g. inotify to monitor directories, e.g. ~/Music/ForPhone/ so that any file added to that directory gets converted.
FWIW I'd use a phone with a microSD card as those days one can get a 1To for less than 100€ so probably no conversion needed even for a large collection.
Edit: based on a recent conversation I'd try transcoding capabilities of LMS https://github.com/epoupon/lms cf https://lms-demo.poupon.dev/settings from their demo instance 