Let's see. The reasons the guitar became so prominent... I can't list them all, but just to name a few:
1) relatively cheap and simple
2) easy to move and not limiting your movements while performing: can be played while standing and walking
3) you can play and sing at the same time
4) possible to amplify
5) easy to learn with a low threshold on mastery to bring simple songs
6) lends itself to a whole range of styles from campfire singalongs to flamenco to screeching metal.
7) flowing out of 5 and 6: not tied to a specific culture or population.
2) and 3) rule out all horns, drums and pianos and unfortunately also the blues harp.
Okay, congas would be possible, but you really can't play melodies. The accordion would be a viable option if it weren't so complicated and therefore expensive. Likewise the violin and up until the 1980's the keyboard. There are some small, simple instruments like the Accordion's smaller brother , the bandoleon, the Jamaican steel drum or the African Calimba, even the various 2, 3 or 4-stringed European Zither or Kantele variants. Unfortunately all of them are tied to their culture and their style.of songs which limits their exposure.
so going in what-if territory, we might possibly find an alternative for the guitar in:
- the portable keyboard if electronics took off earlier and pushed down the price to where a young kid could buy one with his saved-up pocket money at least by the 1960's
-the fiddle if companies started mass-producing cheap models during the late industrial revolution
- the steel drum, the bandoleon and the Calimba if they managed to shake off their colonial or ethnic image and serious composers started making serious music for it.
- probably some more instruments I can't quite think of now.