There's no legal requirement anywhere in the world for a car manufacturer to hold spares for any length of time after they discontinue a model. Source - I worked for a major Japanese auto manufacturer as an engineer.
This is a total myth and there's a lot of rumors on the internet floating around about this. People claim it's "federal law" in the US, or that it's part of "statutory rights" in the UK to have a supply of parts - it isn't. Imagine the insane logistics this would take. Manufacturers would have to have quite literally hundreds of billions of dollars tied up in hardware just lying around "in case" someone's car broke. It's entirely illogical both in financial and environmental terms.
In reality, most auto manufacturers only stock model specific parts to last until their warranty periods run out, but even then they aren't required to do this. Their only requirement is to honour their stated warranty. They generally keep a stock of parts because it makes warranty replacement a lot easier. In this case, the e has a warranty for 3 years, so if the last cars are produced Jan 2024, they'll more than likely hold any model specific parts through to Jan 2027 at the least. In reality it'll be much longer though, given the e still uses a lot of shared parts, despite looking very different.
That said, manufacturers do tend to stamp a stock of panels at the end of a vehicle's production run, and mold a stock of bumpers and trims (if they do this on site at their plant, often it's sub-contracted), typically to last a few years for collision repairs and that kind of thing. Still, manufacturers will often sell off or lease their panel pressing and bumper molding tooling out after a model's production run ends so that a third party can produce panels for models that are end of life.
There are so many shared parts between most models that there's no issue getting hold of them when needed. Even the e uses a large amount of running gear parts from the jazz and civic, and quite a large part of its battery management system and HV battery are shared with the e:NY1/e:NS1, so I can't see there being parts issues for a long time.
Most people are under the impression that when a new car is designed, it's designed from the ground up as a new model. This isn't the case. More often than not a manufacturer will produce a lairy concept car, then will dip into their parts bin for their existing models, or look at what their current suppliers are building, and use everything from struts, springs, pedal assemblies, wiring harnesses, fuse boxes, SRS parts, radar and sonar sensors, heater elements, brake boosters, fluid tanks and all kinds of other stuff from their existing models or their supplier's current designs to save cost and keep their supply chains simplified. This is why the production car tends to look a lot different - it's a cost cutting exercise so they can turn a profit on the car.
Generally when a new model comes out, it's mostly existing parts under the skin from other current models, with body panels, light clusters, glass, and other styling stuff making up the bulk of the parts specific to the new model. I'd wager a guess that even something considered as specific to the e as the mechanics of the door handle actuators are being used somewhere else either in another Honda, or another model for a different manufacturer that's using the same parts supplier.
When it comes to the parts market for cars, most things are manufactured by third parties for multiple customers and the industry is very incestuous to save costs. More often than not you'll find parts for one manufacturer the same as another, just with a different part number depending on which car you're ordering it for. Sometimes the part numbers are even the same.
Personally, I bought my e knowing that it was going to be a car that'd see limited success and would probably only make a five year run of manufacturing - I overestimated the five years as it ended up being four, but I didn't care, and still don't. I like the car, loves its features, its styling and the way it drives, and wanted one. You only live once so if you want something, go for it.
I plan to keep the car for the long term, and the only concern I have about parts is perhaps in 8-10 years or so it might be a pain in the arse to get hold of things such as body panels if needed, light clusters if LEDs start to fail, and interior parts. That said, with the general build quality of the car I've experienced, I don't think there'll be too many issues.