The UK has tens of thousands of Huawei VDSL2 DSLAMs installed, I imagine most countries have similar (Portugal seems to use Huawei for nearly all of their FTTH equipment). They are not dumb pieces of kit at all in terms of computing power.
Regardless, even if it was, it is still a huge potential problem. Imagine Huawei had some backdoor code that looked for a certain pattern of data across any of the network interfaces and corrupted the firmware so it wouldn't load without being physically replaced. China then buys a load of ads and as users browse the web, they load the image with the secret string in, triggering it (one example).
Within a couple of hours enough users have seen it that the vast majority of western infrastructure is down, and needs replaced (and I would assume in this case, China wouldn't be willing to sell more!).
I think this sort of attack would likely take down most 5G anyway - as it's incredibly likely that the backhaul has some sort of Huawei fibre product in it somewhere along the line.