Well, I'd have agreed with you a few years back, but going by my experiences online (the legalise rape of minors, put anyone with a handicap in a camp, nihilism is great praise Chthulhu, and bullying people to commit suicide in inventively sadistic ways is hilarious crowd) and old studies of Nazi Germany, I'd say that a large part of humanity tends to leap at the chance to do unspeakable things for very flimsy reasons, especially the ones who think in terms of ideology rather than unthinking casual inconsideration or cruelty, i.e. want to put atrocities into system.
I've read a bit of Machiavelli, including that quote, and he would definitely qualify as one of the most genuine forms of evil as I see it, meaning completely in-control, no mitigating circumstances whatsoever, absolutely ruthless, underhanded manipulative and honourless, calculated amoral malevolence, so I'm not sure if I'd consider quoting him a good source to excuse Doflamingo, but yes, sometimes avoiding catastrophe requires distasteful methods. The problem with Machiavelli's type of absolutely amoral people is that they tend to argue for using it as an all-encompassing first option while rhetorically "overlooking" that fact.
I also disagree that the One Piece series itself has a completely amoral tone. When the WG destroys an entire country or Crocodile plots to slaughter millions these are not presented as good things, and the value of comradeship, honour, compassion, and courage in the face of injustice are major running themes. The Strawhats themselves, excepting Nico Robin, despite calling themselves pirates, haven't really gone around slaughtering and plundering civilians, or done anything worse than "stealing" some money as payment for their services. I'd more liken them to independent revolutionaries (in the "independent violent social workers opposing any wannabe mass-murderers and standing up for each other" sense, not murderous enough to warrant someone quoting "one man's terrorist is another man's freedom fighter" as I see it) or somesuch. I'd also say that there have been a few characters that are almost as good as people come (Chopper, the Princess of Alabasta, Tashigi) and others literally as bad as what humanity is capable of producing (Doflamingo, Moria, Crocodile, the Tenryuubito, possibly certain WG leaders given their willingness to nuke civilians, but we don't know the full story yet).
If the series has a message I'd say it is that just because someone is part of some "side" and tries to do some good doesn't mean that other members of this side can't do the sort of things he or she hates personally, or that the other side can't contain plenty of honourable people, or that systems of chaos and order can both contain good and evil people or methods/that it's hard to find any uncompromised organisation to join, and that intense desperation and fear can drive othervise decent people to do horrible things, whichever you prefer. In fact I find it refreshingly upbeat, kind, imaginative, and optimistic compared to some of the really hollow, eroding, and sadistic stuff out there, like Bleach or Death Note for example.