The Lebkuchenherzen in your second picture are quite different from the cakey Elisenlebkuchen in your first photo.
To be blunt, they are not primarily designed for consumption, but focus on being a novelty item with witty or cute decoration. They are marketed as “decorative sweets” by a wholesale supplier, others offer customization like for other advertising objects.
If you want to make them yourself, aim for a rather stiff and dry dough, with lots of sweetener (often recipes have both sugar and honey) that gets kneaded quickly and contains no leavener like baking powder. Recipes that whip eggs and sugar and result in a spreadable batter will give you something in the Elisenlebkuchen family. Other good choices for sturdy Lebkuchenherzen are those for gingerbread houses - I have read rave reviews about the gingerbread house recipe by bravetart.