In my opinion it's not "which type of machine is the most profitable"- It all depends on putting the machine in the right loction. It 's a little like real estate, location-location. In other words a coffee machine would not be appropriate outside a grocery store but gum and toy machines would.
The product in the machine must match the type of person who will be constantly walking past it.
Your location and the requirements of your city will dictate what type of license you need. Usually if you have more than 2 machines you'll need a business license. Other locations such as malls and open air markets.may require you to have a peddlers license.
Gum ball machines are the least expensive. They can usually be purchased for less than $200 at your local Sam's Club or Costco.and don't require electric power. They can also be ordered online from Sams Club. A few gum ball machines would be good to start and then progress from there.