The suffix "der ältere" or "der jüngere", "der Jung", or "Jung Hans" is used to distinguish different persons, mostly father and son with he same first name.
I didn' t find so far a family with two children of the exact same name living at the same time. But very often one child died in childhood, and one of the next born children was named after the previous deceased sibling. Though childrens mortality was very high you can find sometimes three sons of the same name, and even the last one didn't grow up to get adult...
In the southwest of Germany it is very usual to use the name Johannes or Hans for the same person. Like William and Bill. In other parrts of germany I suppose you will find the same with Johannes, Johann and Hans.
By the way:
Very often you will find "Johannes" as a kind of suffix to other first name of a boy, or "Anna" for a girl. The meaning of first names Johannes and Johanna (Anna) ist "devinely" or " blessed by god". I think you could understand this in so far you can understand this as kind of wish for rhe new born child...
E.g. here the children in a family:
Johann Adam
Johann Michael
Georg
Anna
Anna Christina
Anna Magdalena
...
...you may find the same persons in later years as follows:
Adam
Michael
Jerg
Anna
Christina
Magdalena
....
Gruß,
Michael