David Moyes was hoping not to talk about Everton but the subject was difficult to avoid before his latest return to Goodison Park. “I’ll tell you this one,” West Ham’s manager said as his mind drifted back to the final day of the winter transfer window in 2013. “It was my last year. I think Everton were a striker short of being top four. You were still needing somewhere like £10m or £15m to get a top striker. We had £1m left. Tony Henry, who’s here, was involved in it, probably more so than anybody. He says: ‘There’s a boy at Barnsley who’s not bad.’”

John Stones was the boy in question and instead of getting that top striker Moyes’s final signing for Everton ended up being a young centre-back from Barnsley who joined for £500,000 and left for £47.5m to Manchester City two and a half years later. That was often how it had to be for Moyes during his 11 years at the club and the point behind the story was that there were plenty of times when all that scrimping and saving forced him to be more creative in the transfer market. “It focuses you differently,” he said. “You have to find a way of getting a talent which might go on.”

Everton have changed since Moyes left for that infamous stint at Manchester United, though not necessarily for the better. Their spending power increased when Farhad Moshiri bought a majority stake in the club in February 2016 but they lack coherence. Despite giving Ronald Koeman almost £140m, more than half of it offset by sales, to play with in the summer, Everton are in dire straits before hosting West Hamon Wednesday evening. They have been gripped by inertia since sacking Koeman last month, losing five of the seven games under David Unsworth, their beleaguered caretaker, and whoever comes in next will be their third managerial appointment since Moyes’s departure.

However he was not looking to gloat. After all it has been a torrid few years for the 54-year-old too, featuring doomed spells at United, Real Sociedad and Sunderland, and there are no guarantees he will be able to repair his reputation at West Ham. For all that Everton are suffering, West Ham are two points behind in 18th place. Moyes has lost to Watford and drawn with Leicester City since replacing Slaven Bilic on an initial six-month contract; Arsenal, Chelsea and Manchester City lie in wait next.

There were some encouraging signs in the 1-1 draw with Leicester, though – more energy, better organisation, some character – and an optimistic assessment is West Ham will benefit if they unlock the talent that allowed Moyes to excel at Everton. “At Everton the first year went quite well,” Moyes said. “The second year was a bit of a dip. I think we lost the last game of the season 5-0 to Manchester City. We had been safe from April. We weren’t getting relegated and we hardly won any games. That was probably the only time I thought: ‘Maybe this is the way it’s going … but we had to get rid of that feeling at Everton of being safe was good enough. If I can get good stability and strength, then it could easily be 11 years. West Ham have unbelievable potential to be up there.”

But that potential is yet to be realised since the move to the London Stadium. West Ham have the 14th-best paid squad in the world but their lowly league position can largely be attributed to an absence of long-term planning. Big names have arrived and disappointed. Confusion has reigned and West Ham are crying out for the kind of intelligence Moyes displayed at Everton.

“Bill Kenwright used to say: ‘You’ve £5m a year to spend,’” he said. “In many ways it was a strength because I knew where I was. Bill would give me any penny he could. He also knew I was treating it like my own money, because I’m a Scotsman, I suppose. We made signings which, a few of them from the lower leagues, we watched really hard. There’s a real bit of due diligence in trying to do the right thing.

“At the moment nearly every question I get asked is: what are you doing in January? In that time it was more: ‘You’ve not got much to spend, what are you going to do with the £500,000 you’ve got left, what’re you going to do?’ We had to keep working with the players and I feel the big thing for me to do is work with the players at West Ham. Not bother too much about who’s not at the club, really think about the players who are here and mould them into a team which can get enough results to move up the league.”

Sam Allardyce, who could yet be heading to Goodison Park, once said West Ham should look to emulate Moyes’s Everton. But improving a club’s infrastructure requires patience. “It takes a bit of time to get things going,” Moyes said. “The important thing is we try to sign good players for the future but who could do a job immediately with the right attitudes and the right types. Not just for the short term but for the long term as well.”

As they prepare for a match of huge significance, Everton and West Ham would both do well to keep that in mind now.