The married father-of-three, identified by German media only as 40-year-old Habte A., had also undergone psychiatric treatment this year, said police in the Swiss canton of Zurich where he lived.
Last Thursday, he had flown into a rage and threatened a neighbour with a knife and locked her up, and also trapped his wife and their children, aged one, three and four, in their flat before running away.
The outbreak of violence was surprising according to his wife and neighbour, Swiss police said. “They unanimously stated that they had never seen him like this before,” a police spokesman said.
Ein durch die Kantonspolizei Zürich zur Verhaftung ausgeschriebener Mann hat am Montag (29.7.2019) in Frankfurt (D) mutmasslich eine Tötung begangen. Er war seit einem Delikt im Bezirk Horgen wenige Tage zuvor zur Verhaftung ausgeschrieben. https://t.co/vIalOoE7kI#KapoZH pic.twitter.com/BYRihNNUHZ
— Kantonspolizei Zürich (@KapoZuerich) July 30, 2019
In a statement, Zurich police said the man had lived in Zurich since 2006 and had a Swiss 'C' (settled foreign national) permit.
Germany's Spiegel Online newspaper report the 40-year-old had worked in tram maintenance for the Zurich Transport Authority (VBZ) since early last year.
German Interior Minister Horst Seehofer noted he had been held up as an example of successful integration in a publication of the social work organization SAH.
Police in Zurich confirmed in a press conference that the suspect had worked for the VBZ but could not say how long he had worked for the organization.
The force said that the man had no known history of violence and that there was, to date, no evidence of radicalization or of an ideological motive for Monday's crime.
German federal police chief Dieter Romann said it appeared the suspect had not been listed as wanted in European police databases and had been able to cross borders freely.
German prosecutors laid murder and attempted murder charges against the man over the attack Monday that left eye-witnesses in need of trauma counselling and shocked the nation.
He allegedly also pushed the boy's mother onto the tracks at Frankfurt's main station, and tried but failed to do the same to a 78-year-old woman.
“While the mother could roll off after the fall and move herself onto a narrow footpath between two tracks, her child was caught by the arriving train and died, on the spot, of his injuries,” said a statement by Frankfurt prosecutors.
The man ran down a platform and across tracks but was followed by passers-by including an off-duty officer, and overpowered by police two blocks from the station.
The suspect did not previously know the victims and showed no signs of alcohol or drug use, prosecutors spokeswoman Nadja Niesen said.
“The crime suggests a psychiatric disorder,” she told a press conference, adding that an examination would ascertain the level of his criminal culpability.
The horrific crime has dominated newspaper front-pages and TV news bulletins, and led politicians to call for heightened security, more camera surveillance and tighter border controls.
Citizens have laid flower wreaths, candles and stuffed toys at the site of the killing and a memorial service was scheduled at the station in the evening.
German Interior Minister Horst Seehofer cut short his summer holiday to meet the heads of major security agencies in Berlin.
Niesen said the man in custody had not yet spoken about a motive.
If formally charged, tried and then found guilty, he would face a likely term of life in prison, she said.
In a similar case earlier this month, a 34-year-old mother died after being pushed in front of a train, allegedly by a Serbian man.
Germany's far-right has seized on both killings to once more criticise what it regards as the flawed immigration policies of Chancellor Angela Merkel's government.