Cracking grout in patio tiles

I have an outdoor patio, about 15 x 50. It is covered with 16 x 16 ceramic tiles. The grout lines are about 1/4" wide. The tile was installed 5 years ago. Three feet of the patio floor is in direct sunlight, most of the floor is in the shade of a roof overhang.
During the last two years, the grout between some tiles is coming loose: Hairline cracks develop where the grout meets the tiles and, before long, sections of the grout crumble. There are no cracks in the tile. The deterioration of the grout is confined to the areas where the tile is exposed to the southern sun.
When I repair the grout, I would like to match the color to the existing grout. This may be a case of thermal expansion. There are no expansion joints in the patio tile area.
How can I repair the grout and how can I prevent the grout from crumbling again. Is there such a thing as flexible grout? Mix the new grout with epoxy?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.