Sync Pulse generator for Composite Video. (Stabilizing video)
Sure, it's possible.

I'm not aware of any existing single-chip solutions (that would be a shopping question anyway, off-topic here).

The general idea is that you need to phase- and frequency-lock a master oscillator to the incoming signal, from which you generate your replacement sync pulses. The key problem is doing a better job of extracting the sync from the incoming signal than the existing monitor does.

You will likely need some custom hardware in addition to your microcontroller. A small CPLD or FPGA could implement the counters and rest of the digital logic. Here's a rough block diagram:

         +----------+     +---------+     +---------+
         | 13.5 MHz |     | H count |     | V count |
         |   VCXO   +-----+ divide  +--+--+ divide  +--+
         |          |     | by 864  |  |  | by 625  |  |
         +----------+     +---------+  |  +---------+  |
              ^                        |               |
              |  Control voltage       |               |
              +-------------+          |               |
                            |          |               |
         +------+ H +-------+-------+  |   new H       | +----+
         | sync +---+ phase compare +--+-----------------+    |
      +--+ sep. | V |       +       |      new V       | | OR +----+
      |  |      +---+  loop filter  +------------------+-+    |    |
      |  +------+   +---------------+                    +----+    |
video |                                                         +--+--+
in ---+---------------------------------------------------------+     | video
                                                                | mux +-- out
                                  replacement sync voltage -----+     |
                                                                +-----+


This isn't a design service, and I'm glossing over a lot of low-level details, but this should give you the general idea. For example, the V counter needs to generate two pulses per cycle for interlaced video.

Firmware on your microcontroller might be involved in the "phase detector + loop filter" section. I'm not familiar with the details of the STM32 &mdash; it might have suitable counters built-in to do the H and V counting.