A "chronic" lack of new duty solicitors may lead to innocent people being found guilty, the Law Society has warned.
A 20-year pay freeze made the job unattractive and could see more people representing themselves in court, it added.
Nearly half of duty solicitors in England and Wales are over 50, reaching nearly two thirds in rural areas. Just 5% are under 35 in some parts of Wales.
The Ministry of Justice said it would ensure there were enough solicitors.
Richard Miller, 52, head of justice at the Law Society described the legal system as "creaking at the seams".
The solicitor's fee is different depending on the county.
Michael Strain, 52, who runs a law firm in Pwllheli, Gwynedd, said: "You are paid a flat rate. In Caernarfon police station it's £172 a job.
"So I would be paid the same for up to three days at a police station on a rape case as I would for two hours where a teenager has smashed a window."
Of the 6,104 duty solicitors in England and Wales only 11% are aged under 35.
Mid and west Wales are some of the worst affected areas, with only one working duty solicitor under 35 in each region.
Katy Hanson, 40, is the youngest duty solicitor in Pembrokeshire and is the managing director of Welch & Co.
She said she was forced to keep on a member of staff who wanted to retire because she could not find a replacement.
"Firms are giving up this kind of work - there are at least three firms here that no longer cover crime," she added.
The duty solicitor fee has seen no increase since 1998 and was cut by 8.75% in 2014 by the coalition government.
In that time the average house price in Wales has more that trebled - from £48,294 to £162,374 - which means the fee they earn is worth less than it was 20 years ago.
Mr Miller said: "We are coming close to a point where the criminal duty solicitor is becoming extinct in some areas... and if you have no solicitor, then there is no fair trial.
"Some people will have to go to court and represent themselves. They could be cross examining witnesses or even the victim themselves.
"Worst case scenario is that you could see innocent people found guilty, simply because they are up against an experienced prosecutor and there is no one to fight their corner."
One solicitor, who wished to remain anonymous, claimed people were already being questioned at police stations without representation - even though they have the right to free legal advice - due to the long waits for a solicitor.
"That is happening now, and is going to happen more and more," they added.
Mr Strain said his firm had been so short-staffed, his office has trained retired police officers to do the work.
"There is so little money in it now, that I couldn't really hire someone on a full-time contract," he said.
Cardiff University Law lecturer Dr Daniel Newman, 35, said criminal legal aid was "not an attractive career choice" for many students.
"The amount of debt students can build up means they often aspire to work in more profitable areas.
"The reality is that criminal legal work in England and Wales is underfunded to the point of turning away all but the most committed."
A Ministry of Justice spokesman said solicitors played a "vital role" in the criminal justice system and the department "routinely meets with legal professionals and will continue to engage with them to ensure a sustainable justice system".
What are criminal duty solicitors?
- If you are questioned at a police station, you are entitled to free legal advice
- They represent you if you did not have a solicitor and are paid by the UK government
- They also prepare cases and represent people in court
- To get this help, people must meet criteria such as living in a household earning less than £21,000 a year