If we're only considering the energy required to brew the coffee, perhaps. But we cannot neglect the energy required to get to the coffee. It makes no sense to have people go out of their way to get a cup of coffee from a shop when they can brew pots of it at home without ever needing to turn on their car (except to get more beans or grounds, typically done with a grocery run so the energy cost is very small in comparison to shops).
It could maybe make sense for commuters who have shops on their way to their place of work and who only want one cup of coffee at the start of their work day. But this completely neglects everyone who:
1. Works from home (or doesn't work)
2. Doesn't have a shop that's on their way to their workplace
3. Wants more than one cup of coffee