The problem with ICE isn't being able to buy them, it's buying them in huge quantities. You'll probably be able to buy them for sports cars or some other low volume commodity.
Of the existing plans to ban the purchase of gas vehicles in the future, do any have exemptions for low volume production of enthusiast vehicles? California's plan (which 17 other states follow) seems to only have exemptions for heavy duty vehicles.[1]
My guess is that enthusiasts will get around these laws by modifying old vehicle frames. New emissions and safety standards tend to grandfather old vehicles in, so as long as the VIN says it was made before a certain date, you can avoid having curtain airbags, backup cameras, tire pressure monitoring systems, electronic stability control, etc. (There requirements are why new cars have so many computers in them.)
OP implied buying engines as single units, an item unto itself - "you'll probably be able to buy them for sports cars". The California executive action is explicitly for the sale of new vehicles.