If no cards in discard pile, when playing swashbuckler but have 4 coffers, are you allowed to take the treasure chest?
No; the “if your discard pile has any cards in it” applies to the rest of the text.
From the official FAQ:

You cannot get the Treasure Chest unless your discard pile had at least one card.