The electronic machines of today are a different dog back when I had machines as you probably have to pay someone to fix them if they go south so my thoughts may only help on a very small level.
Back when I had one of my bottled water companies I was buying other small companies and blending their customers into my routes and one of the companies I bought had some 45 or so machines. 8 or 10 were not on location but the others were and the products sold from them were cookies, crackers and candy and they were 100% mechanical.
Mechanical ones don't break often and when they did I could just frankenstein the machine using parts from the ones that were sitting in the warehouse and they were simple to fix.
The profit margins were very good as I could spend 1.00 and get 3.00 in return and it was easy for me to service them as you could get 90% of them serviced in one day and had the added benefit of the driver having water on the truck for someone that may have run out before their normal delivery day.
We paid the location 10% of the total revenue and I'm sure that the driver ate junk food during the day that the company paid for but it was still a good deal.
I have not seen a coffee vending machine since I was knee high to a grasshopper but I am sure they are still out there. I don't know what kind of quality coffee drink they produce but it is probably instant coffee or bag in a box coffee (I'm guessing a syrup) that is mixed with water which is heated.
You would not be paying a location fee which is good and I would expect the margins to be decent and the price of coffee is much more stable these days than it was for a while so you would have a fairly consistent profit percentage.
I'd check a couple of things in the preliminary phase; Repair issues as they could be a huge pain like
@jordanbc mentioned, profit margins (including cups, sugar, milk, etc), sanitary concerns with whoever issues permits and such for that, lifetime expectations of the machine VS the cost of the machine, as well as if it would make sense to just use a local company to be your vending machine supplier and you get your cut.
You might be better off having a local vending machine company handle that for you and see if there are other vendors you can rent to in order to make your 25K investment make sense and you stick to what you know and let that be a semi-passive income for you.