A true modular design would have plenty of stations to which easy new weapon systems can be added or replaced by newer ones. See the MEKO or StanFlex concepts. The existing LCS are too specialised and apparently not very flexible - perhaps similar to the British Type 21 and Type 42, which had no real potential for upgrades.
Regarding the sensors: you wrote that in case of a different threat the sensors would be not sufficient, e.g. if they would require anti-air defence. But anyway such an defence can be only added on the expense of another capability. That means any addition of ship- or land-based anti-ship missiles to the threat would make the anti-access mission of the LCS impossible, actually that would prevent the access of the LCS and a much larger fleet to handle a combination of threats. And I am do not see what kind of advantage the LCS would provide in such conditions.
As I had written before: the concept of the swarms of small boats as a threat is based on a single scenario: war with Iran. And even Iran could deploy swarms of boats, diesel submarines, mines, aircraft, FAC with anti-ship missiles and land-based anti-ship missiles at the same time.