Wind energy developer Orsted is writing off $4 billion, due largely to the cancellation of two large offshore wind projects in New Jersey whose financial challenges mirror those facing the nascent industry. It added fresh uncertainty to an industry seen by supporters as a way to help end the burning of planet-warming fossil fuels, but derided by opponents as inherently unworkable without massive financial subsidies.