That problem is gone. We can de-age our actors/actresses digitally now (Robert Downey Jr. and Carrie Fisher) and even raise the dead (Peter Cushing) and that capability will only get better/cheaper as time goes by. Certainly by the time Tom Holland starts looking too old to play Peter Parker they'll be able to fix this if they want too (particularly with their budgets)
In the Spiderman case, there's already a workaround if they don't want to do that. Peter Parker can get old and join the Avengers as either Spiderman or Iron Spider, in a leadership role if Infinity War kills off Cap and Iron Man. Miles Morales can be the young Spiderman in the same continuity. Homecoming already heavily hinted that Miles Morales exists.