In current mainstream macro practice, the representative-agent (RA) assumption (of DSGE models and nearly identified with them) side-steps the SMD:
The theorems of Hugo Sonnenschein, Rolf
Mantel and Gerard Debreu in the early 1970s established that the restrictions
that generate well-behaved individual demand functions do not
constrain aggregate demand functions to exhibit the same properties [...]. The new classicals sidestepped
the problem of aggregation either by imagining an economy composed of
identical individuals or by assuming that there is one individual who
represents the whole economy, so that the solution to the optimization
problem of this representative agent gives the aggregate relationships in that
economy. In fact, they adopted the representative-agent model from the
optimal-growth literature of the 1960s.
Using such models, Lucas and others developed the characteristic conclusions
of the new classical school, such as the ineffectiveness of monetary
policy with respect to the real economy (see Hoover 1988). Policy ineffectiveness
was widely regarded by Keynesians as a politically conservative
conclusion. Initially, it was interpreted as a direct consequence of the
rational-expectations hypothesis, which was then regarded as politically
suspect. Later, economists came to see that the assumptions of flexible
prices and perfect competition were the critical factors in the policy
ineffectiveness proposition. Once a wedge had been driven between policy
ineffectiveness and the assumption of rational expectations, the rational expectations
hypothesis was accepted by a wider spectrum of macroeconomists
[...]. New Keynesians found that rational
expectations did not rule out an important role for the government in
stabilizing the economy.
[...]
The representative-agent program elevates the claims of microeconomics in some version or other to the utmost importance, while at the same time not acknowledging that the very microeconomic theory it privileges undermines, in the guise of the Sonnenschein–Debreu–Mantel theorem, the likelihood that the utility function of the representative agent will be any direct analogue of a plausible utility function for an individual agent. Kirman’s (1992) survey article on the representative agent, which highlights the lack of analogy, is well-cited; yet, it is striking that almost all of the citations are by critics of the representative-agent program; there is little evidence that advocates have even noticed the argument against their approach. [...]
All the different views mainstream macroeconomists have about the state of their field and about possible areas of improvement should not diminish the degree to which they converged methodologically in studying fluctuations. They all analyse such phenomena usually through a dynamic stochastic general equilibrium model with a representative agent, firmly grounded on microeconomic principles. Moreover, several of them agree with Chari (2010: 2) that “any interesting model must be a dynamic stochastic general equilibrium model. From this perspective, there is no other game in town.” Therefore, he continues, “a useful aphorism in macroeconomics is: ‘If you have an interesting and coherent story to tell, you can tell it in a DSGE model. If you cannot, your story is incoherent.’”
But RA/DGSE has brought its own problems/critics... especially post-2008:
The representative-agent (RA) assumption prevent DSGE models to address distributional issues, which are one of the major cause of the Great Recession and they are fundamental for studying the effects of policies. [...]
The RA assumption coupled with the implicit presence of a Walrasian auctioneer, which sets prices before exchanges take place, rule out almost by definition the possibility of interactions carried out by heterogeneous individuals. This prevents DSGE model to accurately study the dynamics of credit and financial markets. Indeed, the assumption that the representative agent always satisfies the transversality condition, removes the default risk from DSGE models (Goodhart, 2009). As a consequence, agents face the same interest rate (no risk premia) and all transactions can be undertaken in capital markets without the need of banks. The abstraction from default risks does not allow DSGE models to contemplate the conflict between price and financial stability that Central Banks always face (Howitt, 2011): they just care about the nth-order distortions caused by price misallignments which can eventually result in inflation without considering the huge costs of financial crisis (Stiglitz, 2011, 2015). No surprise that DSGE models work fine in normal time but they are unequipped not only to forecast but also to explain the current crisis (Goodhart, 2009; Krugman, 2011)
There is a bit more subtlety to RA than what I've covered here; RA can include some sources of parametric heterogeneity but assumes a sort of "structural" homogeneity, if I understand that correctly.
This RA-solution to SMD has become the main theoretical attack surface against DSGE models, as far as I can tell. It's also found in the ACE/ABM (computational/agent-based modelling) literature, e.g. Fagiolo and Roventini basically reiterate the above:
First, the well-known Sonnenschein (1972), Mantel (1974), Debreu (1974) theorems prove
that the uniqueness and stability of the general equilibrium cannot be attained even if one places
stringent and unrealistic assumptions about agents. Moreover, Saari and Simon (1978) show
that an inffnite amount of information is required to reach the equilibrium for any initial price
vector.
Given such nihilist conclusions, neoclassical economists took the short-cut of the representative
agent (RA) to obtain stable and unique equilibrium. Indeed, if the choices of heterogeneous
agents collapse to the RA ones, one can circumvent all the aggregation problems and develop
GE macroeconomic models with rigorous Walrasian micro-foundations grounded on rationality
and constrained optimization.
However, the RA assumption is far from being innocent: there are (at least) four reasons for which it cannot be defended (Kirman, 1992) [...]