Thats alot of questions. It would be alot easier if you could provide the sheet music of those pieces directly. Importing a midi file makes everything messed up.
The fugue was rather small. It starts with a theme that is clearly in C. When the second voice comes in and plays the same theme in the dominant it is a real answer. This means that to exactly answer the first voice we will need a F# instead of F. You use a F# and so its a real answer. This also means a modulation to G major. Because this is voice and melody based you cannot look at it in terms of chords. Firstly, before a third voice enter its hard to talk about chords. Secondly, you have to repeat and retain the theme as accurately as possible. You do not want to sacrifice the subject for some chord progression. Usually after all voiced played the subject, either in the dominant with a F# or in the tonic key with a F you will get a small free part and then a cadence, usually a incomplete or deceptive one on the I chord, or one on the V. So the first section might even end in G major. Yours does in measure 14, the G chord. Then you could have a second exposition/reexposition. Then a development and end in C major. I am not sure what happens then, seems like an half inverted subject or something. So I guess that part is a development section.
Your last 6 measures are in C major again and it ends on C with a V-I cadence.
I am not sure what the third voice is doing. It should start with the subject too. Also you can have countersubjects. Have voice A play something after voice B starts with the subject and have voice B play that too when voice C starts. You can be alot more flexible with the countersubject. It also gives some more thematic material for the development.
I opened the Dm sonata, it looks like a mess

I see C#s or Dbs. What are they doing there

Maybe D harmonic minor? In measure 9 you get a chromatic sound because of the Edim to Cbdim7 chords. These are strange. It sounds cool. And the next measure you throw in the A chord and then to an E major chord(huh!

). So Dm Edim C F Edim Bdim7 A E. Or i-iidim-VII-III-ii-bvii-V-II In terms of smooth modulations that isn't very smooth. It creates a very distinct sound. You mix all three minor scales and more. I never have the guts to do something like that

You might not know what you are doing, but you are sure doing alot of stuff! I am no expert on genres, but I don't think this is typical baroque harmony. If it wasn't for the melodic and ritmic elements it wouldn't be baroque, I think.
Romantic music generally doesn't have any smooth modulations like the really basic textbook example I explained above. Bach does some crazy stuff on occasion. Beethoven is generally kind of a conservative romantic harmonic wise. Like he was a romantic in melody, style and shape/strucute, but not in harmony. And now I am talking about his latter works.
Do the modulations sound smooth to you?
So original sheet music will help alot. But why do you need help? You can write down the chord names yourself, assign roman numbers etc, right?
You just need to devolop your own harmonic style. Seems you are already on your way with that. Thats it.
You don't really consider textbook examples. And you don't even consider anything the moment you improvise. That is kind of based on reflexes, muscle memory. Like Ted pointed out in his post, you just practise things the his example and have it ready as a reflex in your hands. Then just play it.