Lezyne make a range of small pumps with reversible connector hoses that fit presta valves at one end and schrader valves at the other https://ride.lezyne.com/collections/hand-pumps-1. They come in two diameters: Fatter for low pressure higher volume and thinner for high pressure tyres.
I have one of the thin versions, it is the pump I usually have with me on most rides. It still works well after at least ten years, but generally only gets used when I get a puncture or when I lend it to someone. Small enough to go in a side pocket on a saddlebag or elsewhere in luggage. Not too bad for inflating a 16" Brompton tyre, but it takes a long time with a 26" x 2" tyre.
I have a second Lezyne Micro Floor Drive pump that I take on long trips with my large-wheel bikes. It gets used for topping up tyre pressure every day or two (I use latex tubes on my main touring bike), so I should notice quickly if it stops working. Not so compact as the first one, but it still fits easily inside a pannier bag. Not quite so efficient as the full-size track pump I have at home, but much quicker to inflate a fat tyre than the smaller pump.
I don't take both.
I stopped using the long frame-fit pumps, along with "proper" water bottles, before I moved to France more than 40 years ago. In England at that time these would be regularly stolen if left on the bike, sometimes even on a short toilet stop.