Modern emission systems have come a long way since the early ones that really gave things a bad rap. There are things you can do to ensure it runs as it's supposed to, like ensuring full regenerations, high quality fuel, cetane booster and additives, etc. The new DEF injected systems ensure that engines don't need as much EGR as they have historically, as NOx can be counteracted this way as well. This is why we are seeing diesels with more power than ever still meeting emission standards. Here's a good conversation with a ford diesel designer that may answer some of your questions. The system will need maintenance, but so far I've been impressed with the system on this truck. I haven't had a single emission related issue, aside from the EGR valve recalls that ford is taking care of. If you are buying a new one, this will have already been completed. Best engine that I've owned in an F-150, would not hesitate to buy again.
New Ford Diesel Tech Explained, How Far Diesel Engines Have Come - YouTube
New Ford Diesel Tech Explained, How Far Diesel Engines Have Come - YouTube