TIL Black Americans were developing the Afro-Futurism/Black Sci-Fi genre of literature as early as the mid-19th century. Titles such as 'Blake' (1859), 'Iola Leroy' (1892), 'Imperium In Imperio (1899)
You might be right about these not being sci-fi, but sci-fi can take place in the period in which it was written. Alternative history plus sci-fi can definitely be a thing. Or writing sci-fi that's supposed to take place in just a few years.
"Samuel R. Delany described it as "about as close to an SF-style alternate history novel as you can get.
Further, while it incorporates elements of the fugitive slave narrative, Blake's narrator is also a scientist, whose focus on data collection and research stand in repudiation of the racial science of the day.[10] In fact, this reflects one of Delany's major themes: that Africa and its contributions to science and math were foundational to the Western world.[12]"
Considering we're talking about the era of the belief in Drapetomania, I'd say a slave revolt followed by an attempt by black people to take over Cuba would be considered sci-fi by a lot of readers.
If you're into sci-fi and Afro-futurism I really enjoyed Sweep of Stars by Maurice Broaddus (written a couple years ago; cool to see what a long history it's building on)