I have read that the F-22 requires an excessive amount of maintenance and this was true from introduction. It was questionable as to whether a squadron could be kept operational at reasonable levels of capability under war time conditions as opposed to during an exercise.Far from certain that the termination decision was the wrong one.
The Raptor programme was conceived as a counter to the (at the time) "scary" Fulcrum and Flanker, with their airshow manoeuvres and long range BVR AAM, which were a step change from the Flagon/Flogger/Foxbat/Foxhound of the 70s and 80s.
Trouble was, by the time they'd solved the development issues (supercruise, unstable FBW, vectored thrust, LO materials etc), the main threat had collapsed and the new threats weren't really on the horizon. While there were exported Fulcrum/Flanker variants to counter, experience had shown that unless operated by peer/near-peer threats, they weren't going to be enough of a problem to justify several hundred brand-spanking new uber-fighters costing a gazillion dollars each.
In some ways the cousins may have dodged a bullet. The component equipments in those aircraft are nigh-on twenty years old now and possibly not as supportable as one might like. Supporting hardware and software of that vintage is not cheap. At least the F15 and F16 have remained supportable through export-led upgrades and slow pensioning off to AMARC.
Arguably, NGAD and FA XX could have been pulled forwards so they weren't quite so far off, but it's not as if the oppo are fielding clouds of Firefox at the minute.
The F-35 apparently corrected a lot of the problems of the F-22 with respect to maintainability. With dog fighting seen as being on its way out any supposedly better manoeuvrability of the F-22 was not seen as important. Any features of its electronics or software which were considered important could be added to the F-35 later if required.
I've also read that a big part of the decision to cancel the F-22 came down to people realizing that with no major immediate threat they would rather wait for the F35 which was then in the pipeline than continue to buy F-22s.